pub struct DirEntry { /* private fields */ }
Expand description
DirEntry is a [Capability] that’s a thin wrapper over vfs::directory::entry::DirectoryEntry
When externalized to FIDL, a DirEntry becomes an opaque eventpair
token. This means that
external users can delegate DirEntrys and put them in [Dict]s, but they cannot create their
own.
The [Capability::try_into_directory_entry] implementation simply extracts the inner vfs::directory::entry::DirectoryEntry object.
DirEntry is a stopgap for representing CF capabilities that don’t have a natural bedrock representation yet. https://fxbug.dev/340891837 tracks its planned deletion.
When built for host, DirEntry is an empty placeholder type, as vfs is not supported on host.
Implementations§
Source§impl DirEntry
impl DirEntry
Sourcepub fn new(entry: Arc<dyn DirectoryEntry>) -> Self
pub fn new(entry: Arc<dyn DirectoryEntry>) -> Self
Creates a DirEntry capability from a vfs::directory::entry::DirectoryEntry.
pub fn to_directory_entry(self) -> Arc<dyn DirectoryEntry>
Sourcepub fn open_entry(&self, open_request: OpenRequest<'_>) -> Result<(), Status>
pub fn open_entry(&self, open_request: OpenRequest<'_>) -> Result<(), Status>
Opens the corresponding entry by forwarding open_request
.
pub fn dirent_type(&self) -> DirentType
Trait Implementations§
Source§impl CapabilityBound for DirEntry
impl CapabilityBound for DirEntry
fn debug_typename() -> &'static str
Source§impl DirectoryEntry for DirEntry
impl DirectoryEntry for DirEntry
Source§fn open_entry(self: Arc<Self>, request: OpenRequest<'_>) -> Result<(), Status>
fn open_entry(self: Arc<Self>, request: OpenRequest<'_>) -> Result<(), Status>
Source§impl From<DirEntry> for Capability
impl From<DirEntry> for Capability
Source§impl From<DirEntry> for Capability
impl From<DirEntry> for Capability
Source§impl FromEnum<Capability> for DirEntry
impl FromEnum<Capability> for DirEntry
fn from_enum(e: &Capability) -> Option<&Self>
Source§impl GetEntryInfo for DirEntry
impl GetEntryInfo for DirEntry
Source§fn entry_info(&self) -> EntryInfo
fn entry_info(&self) -> EntryInfo
Source§impl RemotableCapability for DirEntry
impl RemotableCapability for DirEntry
Source§fn try_into_directory_entry(
self,
_scope: ExecutionScope,
) -> Result<Arc<dyn DirectoryEntry>, ConversionError>
fn try_into_directory_entry( self, _scope: ExecutionScope, ) -> Result<Arc<dyn DirectoryEntry>, ConversionError>
self
to a DirectoryEntry which can be served in a
VFS. Read moreAuto Trait Implementations§
impl Freeze for DirEntry
impl !RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl !UnwindSafe for DirEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more