Skip to main content

XilaFileSystemFile

Struct XilaFileSystemFile 

Source
pub struct XilaFileSystemFile { /* private fields */ }
Expand description

Opaque shadow type generated for FFI pointer boundaries.

Implementations§

Source§

impl XilaFileSystemFile

Source

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.

Source

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.

Source

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.

Source

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>§

Source

pub fn set_position(&mut self, position: &Position) -> Result<u64, Error>

Source

pub fn write(&mut self, buffer: &[u8]) -> Result<usize, Error>

Source

pub fn write_vectored(&mut self, buffers: &[&[u8]]) -> Result<usize, Error>

Source

pub fn write_line(&mut self, buffer: &[u8]) -> Result<usize, Error>

Source

pub fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Error>

Source

pub fn read_until( &mut self, buffer: &mut [u8], delimiter: &[u8], ) -> Result<usize, Error>

Source

pub fn read_to_end( &mut self, buffer: &mut Vec<u8>, chunk_size: usize, ) -> Result<usize, Error>

Source

pub fn flush(&mut self) -> Result<(), Error>

Source

pub fn duplicate(&self) -> Result<SynchronousFile, Error>

Source

pub fn get_statistics(&mut self) -> Result<Statistics, Error>

Source

pub fn set_owner( &mut self, user: Option<UserIdentifier>, group: Option<GroupIdentifier>, ) -> Result<(), Error>

Source

pub fn set_permissions(&mut self, permissions: Permissions) -> Result<(), Error>

Source

pub fn control<C>( &mut self, _command: C, argument: &<C as ControlCommand>::Input, ) -> Result<<C as ControlCommand>::Output, Error>

Source

pub fn get_access(&self) -> Result<AccessFlags, Error>

Source

pub fn get_state(&self) -> Result<StateFlags, Error>

Source

pub fn close_internal( &mut self, virtual_file_system: &VirtualFileSystem, ) -> Result<(), Error>

Trait Implementations§

Source§

impl AsMut<SynchronousFile> for XilaFileSystemFile

Source§

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

Source§

fn as_ref(&self) -> &SynchronousFile

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Deref for XilaFileSystemFile

Source§

type Target = SynchronousFile

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for XilaFileSystemFile

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.