Skip to main content

ReplyCreate

Struct ReplyCreate 

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

Create reply

Implementations§

Source§

impl ReplyCreate

Source

pub fn created( self, ttl: &Duration, attr: &FileAttr, generation: Generation, fh: FileHandle, flags: FopenFlags, )

Reply to a request with a newly created file entry and its newly open file handle

§Panics

When attempting to use kernel passthrough. Use opened_passthrough() instead.

Source

pub fn error(self, err: Errno)

Reply to a request with the given error code

Source

pub fn open_backing(&self, fd: impl AsFd) -> Result<BackingId>

Registers a fd for passthrough, returning a BackingId. Once you have the backing ID, you can pass it as the 6th parameter of ReplyCreate::created_passthrough(). This is done in two separate steps because it may make sense to reuse backing IDs (to avoid having to repeatedly reopen the underlying file or potentially keep thousands of fds open).

Source

pub fn created_passthrough( self, ttl: &Duration, attr: &FileAttr, generation: Generation, fh: FileHandle, flags: FopenFlags, backing_id: &BackingId, )

Reply to a request with an opened backing id. Call ReplyCreate::open_backing() to get one of these.

Trait Implementations§

Source§

impl Debug for ReplyCreate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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<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, 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.