pub struct XilaFileSystemFile { /* private fields */ }Expand description
Opaque shadow type generated for FFI pointer boundaries.
Implementations§
Source§impl XilaFileSystemFile
impl XilaFileSystemFile
Sourcepub const fn from_real(real: &mut SynchronousFile) -> *mut Self
pub const fn from_real(real: &mut SynchronousFile) -> *mut Self
Converts a real allocated instance into an opaque raw pointer handle.
Note: This moves the real object onto the heap via Box to ensure its memory remains valid after this function returns.
Sourcepub unsafe fn into_real(ptr: *mut Self) -> *mut SynchronousFile
pub unsafe fn into_real(ptr: *mut Self) -> *mut SynchronousFile
Consumes the opaque raw pointer handle and returns the original real type, reclaiming ownership and freeing the underlying heap allocation.
§Safety
The pointer must be non-null and must have been created by from_real.
Sourcepub unsafe fn as_real<'a>(ptr: *const Self) -> &'a SynchronousFile
pub unsafe fn as_real<'a>(ptr: *const Self) -> &'a SynchronousFile
Temporarily borrows the real type immutably from the opaque pointer.
§Safety
The pointer must be valid and dereferenceable for the duration of life ’a.
Sourcepub unsafe fn as_real_mut<'a>(ptr: *mut Self) -> &'a mut SynchronousFile
pub unsafe fn as_real_mut<'a>(ptr: *mut Self) -> &'a mut SynchronousFile
Temporarily borrows the real type mutably from the opaque pointer.
§Safety
The pointer must be valid, dereferenceable, and unaliased for the duration of life ’a.
Methods from Deref<Target = SynchronousFile>§
pub fn set_position(&mut self, position: &Position) -> Result<u64, Error>
pub fn write(&mut self, buffer: &[u8]) -> Result<usize, Error>
pub fn write_vectored(&mut self, buffers: &[&[u8]]) -> Result<usize, Error>
pub fn write_line(&mut self, buffer: &[u8]) -> Result<usize, Error>
pub fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Error>
pub fn read_until( &mut self, buffer: &mut [u8], delimiter: &[u8], ) -> Result<usize, Error>
pub fn read_to_end( &mut self, buffer: &mut Vec<u8>, chunk_size: usize, ) -> Result<usize, Error>
pub fn flush(&mut self) -> Result<(), Error>
pub fn duplicate(&self) -> Result<SynchronousFile, Error>
pub fn get_statistics(&mut self) -> Result<Statistics, Error>
pub fn set_owner( &mut self, user: Option<UserIdentifier>, group: Option<GroupIdentifier>, ) -> Result<(), Error>
pub fn set_permissions(&mut self, permissions: Permissions) -> Result<(), Error>
pub fn control<C>( &mut self, _command: C, argument: &<C as ControlCommand>::Input, ) -> Result<<C as ControlCommand>::Output, Error>
pub fn get_access(&self) -> Result<AccessFlags, Error>
pub fn get_state(&self) -> Result<StateFlags, Error>
pub fn close_internal( &mut self, virtual_file_system: &VirtualFileSystem, ) -> Result<(), Error>
Trait Implementations§
Source§impl AsMut<SynchronousFile> for XilaFileSystemFile
impl AsMut<SynchronousFile> for XilaFileSystemFile
Source§fn as_mut(&mut self) -> &mut SynchronousFile
fn as_mut(&mut self) -> &mut SynchronousFile
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<SynchronousFile> for XilaFileSystemFile
impl AsRef<SynchronousFile> for XilaFileSystemFile
Source§fn as_ref(&self) -> &SynchronousFile
fn as_ref(&self) -> &SynchronousFile
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Deref for XilaFileSystemFile
impl Deref for XilaFileSystemFile
Auto Trait Implementations§
impl Freeze for XilaFileSystemFile
impl RefUnwindSafe for XilaFileSystemFile
impl Send for XilaFileSystemFile
impl Sync for XilaFileSystemFile
impl Unpin for XilaFileSystemFile
impl UnsafeUnpin for XilaFileSystemFile
impl UnwindSafe for XilaFileSystemFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more