pub struct DirectoryAndToken {
pub directory: ClientEnd<DirectoryMarker>,
pub token: EventPair,
}
Expand description
A handle to a directory and a token used to indicate when the client has completed inspecting the directory. The server end will retain all resources, such as subdirectories and files, within |directory| while |release_fence| remains open. |release_fence| is used instead of observing the |directory| channel directly as it is possible to clone and open new channels to the same directory.
Fields§
§directory: ClientEnd<DirectoryMarker>
Directory
channel providing access to the directory. This channel should not be used
after release_fence
is closed.
token: EventPair
An eventpair handle used to control the retention of the directory. When this handle is closed, the directory is no longer retained.
Trait Implementations§
Source§impl Debug for DirectoryAndToken
impl Debug for DirectoryAndToken
Source§impl Decode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for DirectoryAndToken
impl Decode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for DirectoryAndToken
Source§impl Encode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for &mut DirectoryAndToken
impl Encode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for &mut DirectoryAndToken
Source§impl<T0: Encode<Endpoint<ClientEnd<DirectoryMarker>>, DefaultFuchsiaResourceDialect>, T1: Encode<HandleType<EventPair, { _ }, 2147483648>, DefaultFuchsiaResourceDialect>> Encode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for (T0, T1)
impl<T0: Encode<Endpoint<ClientEnd<DirectoryMarker>>, DefaultFuchsiaResourceDialect>, T1: Encode<HandleType<EventPair, { _ }, 2147483648>, DefaultFuchsiaResourceDialect>> Encode<DirectoryAndToken, DefaultFuchsiaResourceDialect> for (T0, T1)
Source§impl Hash for DirectoryAndToken
impl Hash for DirectoryAndToken
Source§impl Ord for DirectoryAndToken
impl Ord for DirectoryAndToken
Source§fn cmp(&self, other: &DirectoryAndToken) -> Ordering
fn cmp(&self, other: &DirectoryAndToken) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DirectoryAndToken
impl PartialEq for DirectoryAndToken
Source§impl PartialOrd for DirectoryAndToken
impl PartialOrd for DirectoryAndToken
Source§impl ResourceTypeMarker for DirectoryAndToken
impl ResourceTypeMarker for DirectoryAndToken
Source§type Borrowed<'a> = &'a mut DirectoryAndToken
type Borrowed<'a> = &'a mut DirectoryAndToken
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for DirectoryAndToken
impl TypeMarker for DirectoryAndToken
Source§type Owned = DirectoryAndToken
type Owned = DirectoryAndToken
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.impl Eq for DirectoryAndToken
impl Standalone<DefaultFuchsiaResourceDialect> for DirectoryAndToken
impl StructuralPartialEq for DirectoryAndToken
Auto Trait Implementations§
impl Freeze for DirectoryAndToken
impl RefUnwindSafe for DirectoryAndToken
impl Send for DirectoryAndToken
impl Sync for DirectoryAndToken
impl Unpin for DirectoryAndToken
impl UnwindSafe for DirectoryAndToken
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