Skip to main content

FileDescriptorHandlerReadOnlyAsync

Struct FileDescriptorHandlerReadOnlyAsync 

Source
pub struct FileDescriptorHandlerReadOnlyAsync<TId: FileIdType> { /* private fields */ }
Expand description

Async read-only file-descriptor helpers.

With Linux feature io_uring, read, flush, and fsync use io_uring; other methods use synchronous unix_fs calls. On BSD/macOS they all remain synchronous.

Implementations§

Source§

impl<TId: FileIdType> FileDescriptorHandlerReadOnlyAsync<TId>

Source

pub fn new() -> Self

Source§

impl<TId: FileIdType> FileDescriptorHandlerReadOnlyAsync<TId>

Source

pub async fn flush<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, _lock_owner: u64, ) -> FuseResult<()>

Source

pub async fn fsync<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, datasync: bool, ) -> FuseResult<()>

Source

pub async fn lseek<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, seek: SeekFrom, ) -> FuseResult<i64>

Source

pub async fn read<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, seek: SeekFrom, size: u32, _flags: OpenFlags, _lock_owner: Option<u64>, ) -> FuseResult<Vec<u8>>

Source

pub async fn release( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<OwnedFd>, _flags: OpenFlags, _lock_owner: Option<u64>, _flush: bool, ) -> FuseResult<()>

Source

pub async fn getlk<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, lock_owner: u64, lock_info: LockInfo, ) -> FuseResult<LockInfo>

Source

pub async fn ioctl<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, _flags: IoctlFlags, cmd: u32, in_data: Vec<u8>, out_size: u32, ) -> FuseResult<(i32, Vec<u8>)>

Source

pub async fn setlk<'a>( &self, _req: &RequestInfo, _file_id: TId, file_handle: Option<&mut OwnedFd>, lock_owner: u64, lock_info: LockInfo, sleep: bool, ) -> FuseResult<()>

Trait Implementations§

Source§

impl<TId: FileIdType> Default for FileDescriptorHandlerReadOnlyAsync<TId>

Available on crate feature async only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.