pub struct DirConnector { /* private fields */ }Expand description
A capability to obtain a channel to a [fuchsia.io/Directory]. As the name suggests, this is
similar to [Connector], except the channel type is always [fuchsia.io/Directory], and vfs
nodes that wrap this capability should have the DIRECTORY entry_type.
Implementations§
Source§impl DirConnector
 
impl DirConnector
pub fn new() -> (DirReceiver, Self)
pub fn from_proxy( proxy: DirectoryProxy, subdir: RelativePath, flags: Flags, ) -> Self
pub fn new_sendable(connector: impl DirConnectable + 'static) -> Self
pub fn send( &self, dir: ServerEnd<DirectoryMarker>, subdir: RelativePath, flags: Option<Flags>, ) -> Result<(), ()>
pub fn with_subdir(self, subdir: RelativePath) -> Self
Source§impl DirConnector
 
impl DirConnector
pub fn from_directory_entry( directory_entry: Arc<dyn DirectoryEntry>, flags: Flags, ) -> Self
Trait Implementations§
Source§impl CapabilityBound for DirConnector
 
impl CapabilityBound for DirConnector
fn debug_typename() -> &'static str
Source§impl Clone for DirConnector
 
impl Clone for DirConnector
Source§fn clone(&self) -> DirConnector
 
fn clone(&self) -> DirConnector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for DirConnector
 
impl Debug for DirConnector
Source§impl DirConnectable for DirConnector
 
impl DirConnectable for DirConnector
Source§fn maximum_flags(&self) -> Flags
 
fn maximum_flags(&self) -> Flags
Returns the maximum set of flags that may be passed to this DirConnectable. For example, to
disallow calling 
send with write permissions, this function could return
fidl_fuchsia_io::PERM_READABLE. Read morefn send( &self, channel: ServerEnd<DirectoryMarker>, subdir: RelativePath, flags: Option<Flags>, ) -> Result<(), ()>
Source§impl DirectoryEntry for DirConnector
 
impl DirectoryEntry for DirConnector
Source§fn open_entry(self: Arc<Self>, request: OpenRequest<'_>) -> Result<(), Status>
 
fn open_entry(self: Arc<Self>, request: OpenRequest<'_>) -> Result<(), Status>
Opens this entry.
Source§impl From<DirConnector> for Capability
 
impl From<DirConnector> for Capability
Source§fn from(f: DirConnector) -> Self
 
fn from(f: DirConnector) -> Self
Converts to this type from the input type.
Source§impl From<DirConnector> for Capability
 
impl From<DirConnector> for Capability
Source§fn from(connector: DirConnector) -> Self
 
fn from(connector: DirConnector) -> Self
Converts to this type from the input type.
Source§impl From<DirConnector> for DirConnector
 
impl From<DirConnector> for DirConnector
Source§fn from(value: DirConnector) -> Self
 
fn from(value: DirConnector) -> Self
Converts to this type from the input type.
Source§impl FromEnum<Capability> for DirConnector
 
impl FromEnum<Capability> for DirConnector
fn from_enum(e: &Capability) -> Option<&Self>
Source§impl GetEntryInfo for DirConnector
 
impl GetEntryInfo for DirConnector
Source§fn entry_info(&self) -> EntryInfo
 
fn entry_info(&self) -> EntryInfo
This method is used to populate ReadDirents() output.
Source§impl RemotableCapability for DirConnector
 
impl RemotableCapability for DirConnector
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>
Attempt to convert 
self to a DirectoryEntry which can be served in a
VFS. Read moreSource§impl RemoteLike for DirConnector
 
impl RemoteLike for DirConnector
Source§fn open(
    self: Arc<Self>,
    _scope: ExecutionScope,
    path: Path,
    flags: Flags,
    object_request: ObjectRequestRef<'_>,
) -> Result<(), Status>
 
fn open( self: Arc<Self>, _scope: ExecutionScope, path: Path, flags: Flags, object_request: ObjectRequestRef<'_>, ) -> Result<(), Status>
Called when a fuchsia.io/Directory.Open request should be forwarded to the remote node.
Source§fn lazy(&self, _path: &Path) -> bool
 
fn lazy(&self, _path: &Path) -> bool
Returns whether the remote should be opened lazily for the given path.  If true, the remote
won’t be opened until the channel in the request is readable.  This request will not be
considered lazy if the request requires an event such as OnRepresentation, and this method
will by bypassed.
Source§fn deprecated_open(
    self: Arc<Self>,
    _scope: ExecutionScope,
    flags: OpenFlags,
    _path: Path,
    server_end: ServerEnd<NodeMarker>,
)
 
fn deprecated_open( self: Arc<Self>, _scope: ExecutionScope, flags: OpenFlags, _path: Path, server_end: ServerEnd<NodeMarker>, )
DEPRECATED - Do not implement unless required for backwards compatibility. Called when
forwarding fuchsia.io/Directory.DeprecatedOpen requests.
Source§impl TryFrom<Capability> for DirConnector
 
impl TryFrom<Capability> for DirConnector
Auto Trait Implementations§
impl Freeze for DirConnector
impl !RefUnwindSafe for DirConnector
impl Send for DirConnector
impl Sync for DirConnector
impl Unpin for DirConnector
impl !UnwindSafe for DirConnector
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
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>
Converts 
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>
Converts 
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