DirConnectable

Trait DirConnectable 

Source
pub trait DirConnectable:
    Send
    + Sync
    + Debug {
    // Required methods
    fn maximum_flags(&self) -> Flags;
    fn send(
        &self,
        dir: ServerEnd<DirectoryMarker>,
        subdir: RelativePath,
        flags: Option<Flags>,
    ) -> Result<(), ()>;
}
Expand description

Types that implement DirConnectable let the holder send directory channels to them. Any DirConnectable should be wrapped in a DirConnector.

Required Methods§

Source

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.

The following flags are always permitted, regardless of the returned value:

  • fidl_fuchsia_io::Flags::PROTOCOL_SERVICE
  • fidl_fuchsia_io::Flags::PROTOCOL_NODE
  • fidl_fuchsia_io::Flags::PROTOCOL_DIRECTORY
  • fidl_fuchsia_io::Flags::PROTOCOL_FILE
  • fidl_fuchsia_io::Flags::PROTOCOL_SYMLINK
  • fidl_fuchsia_io::Flags::FLAG_SEND_REPRESENTATION
  • fidl_fuchsia_io::Flags::FLAG_MAYBE_CREATE
  • fidl_fuchsia_io::Flags::FLAG_MUST_CREATE
  • fidl_fuchsia_io::Flags::FLAG_CREATE_AS_UNNAMED_TEMPORARY
  • fidl_fuchsia_io::Flags::FILE_APPEND
  • fidl_fuchsia_io::Flags::FILE_TRUNCATE

If the returned value does not contain the set of flags fidl_fuchsia_io::INHERITED_WRITE_PERMISSIONS, then fidl_fuchsia_io::Flags::PERM_INHERIT_WRITE will be stripped from any flags passed to send if it is set.

If the returned value does not contain the flag fidl_fuchsia_io::Flags::PERM_INHERIT_EXECUTE, then fidl_fuchsia_io::Flags::PERM_EXECUTE will be stripped from any flags passed to send if it is set.

Source

fn send( &self, dir: ServerEnd<DirectoryMarker>, subdir: RelativePath, flags: Option<Flags>, ) -> Result<(), ()>

Implementations on Foreign Types§

Source§

impl DirConnectable for UnboundedSender<ServerEnd<DirectoryMarker>>

Source§

fn maximum_flags(&self) -> Flags

Source§

fn send( &self, dir: ServerEnd<DirectoryMarker>, subdir: RelativePath, flags: Option<Flags>, ) -> Result<(), ()>

Implementors§