[−][src]Struct fuse::protocol::readdir::ReaddirResponse
Response type for FuseHandlers::readdir.
Implementations
impl<'_> ReaddirResponse<'_>[src]
pub const EMPTY: &'static ReaddirResponse<'static>[src]
An empty ReaddirResponse that cannot have entries added to it.
This is useful for returning end-of-stream responses.
impl<'a> ReaddirResponse<'a>[src]
pub fn with_max_size(max_size: u32) -> ReaddirResponse<'a>[src]
This is supported on
feature="std" only.Constructs a new, empty ReaddirResponse that will grow up to the given
maximum size.
Examples
fn readdir( request: &fuse::ReaddirRequest, respond: impl for<'a> fuse::Respond<fuse::ReaddirResponse<'a>>, ) { let mut response = fuse::ReaddirResponse::with_max_size(request.size()); /* fill in response */ respond.ok(&response); }
pub fn with_capacity(capacity: &'a mut [u8]) -> ReaddirResponse<'a>[src]
Constructs a new, empty ReaddirResponse that will use the given buffer
as capacity. The caller is responsible for allocating a buffer of the
appropriate size and alignment.
Panics
Panics if buf is not sufficiently aligned. The minimum alignment is
align_of::<u64>().
Examples
fn readdir( request: &fuse::ReaddirRequest, respond: impl for<'a> fuse::Respond<fuse::ReaddirResponse<'a>>, ) { let mut buf = new_aligned_buf(request.size()); let mut response = fuse::ReaddirResponse::with_capacity(&mut buf); /* fill in response */ respond.ok(&response); }
pub fn entries(&self) -> impl Iterator<Item = &ReaddirEntry>[src]
pub fn add_entry(
&mut self,
node_id: NodeId,
name: &NodeName,
cursor: NonZeroU64
) -> &mut ReaddirEntry[src]
&mut self,
node_id: NodeId,
name: &NodeName,
cursor: NonZeroU64
) -> &mut ReaddirEntry
pub fn try_add_entry(
&mut self,
node_id: NodeId,
name: &NodeName,
cursor: NonZeroU64
) -> Result<&mut ReaddirEntry, ReaddirError>[src]
&mut self,
node_id: NodeId,
name: &NodeName,
cursor: NonZeroU64
) -> Result<&mut ReaddirEntry, ReaddirError>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ReaddirResponse<'a>
impl<'a> Send for ReaddirResponse<'a>
impl<'a> Sync for ReaddirResponse<'a>
impl<'a> Unpin for ReaddirResponse<'a>
impl<'a> !UnwindSafe for ReaddirResponse<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,