vfs

Trait ProtocolsExt

Source
pub trait ProtocolsExt:
    ToFileOptions
    + ToNodeOptions
    + Sync
    + 'static {
Show 14 methods // Required methods fn is_dir_allowed(&self) -> bool; fn is_file_allowed(&self) -> bool; fn is_symlink_allowed(&self) -> bool; fn is_any_node_protocol_allowed(&self) -> bool; fn creation_mode(&self) -> CreationMode; fn rights(&self) -> Option<Operations>; fn to_directory_options(&self) -> Result<DirectoryOptions, Status>; fn to_symlink_options(&self) -> Result<SymlinkOptions, Status>; fn to_service_options(&self) -> Result<ServiceOptions, Status>; fn get_representation(&self) -> bool; fn is_append(&self) -> bool; fn is_truncate(&self) -> bool; fn create_directory(&self) -> bool; fn is_node(&self) -> bool;
}
Expand description

Extends fio::Flags and fio::OpenFlags

Required Methods§

Source

fn is_dir_allowed(&self) -> bool

True if the directory protocol is allowed.

Source

fn is_file_allowed(&self) -> bool

True if the file protocol is allowed.

True if the symlink protocol is allowed.

Source

fn is_any_node_protocol_allowed(&self) -> bool

True if any node protocol is allowed.

Source

fn creation_mode(&self) -> CreationMode

The creation mode for the connection.

Source

fn rights(&self) -> Option<Operations>

The rights for the connection. If None, it means the connection is not for a node based protocol. If the connection is supposed to use the same rights as the parent connection, the rights should have been populated.

Source

fn to_directory_options(&self) -> Result<DirectoryOptions, Status>

Convert to directory options. Returns an error if the request does not permit a directory.

Convert to symlink options. Returns an error if the request does not permit a symlink.

Source

fn to_service_options(&self) -> Result<ServiceOptions, Status>

Convert to service options. Returns an error if the request is not valid for a service.

Source

fn get_representation(&self) -> bool

True if REPRESENTATION is desired.

Source

fn is_append(&self) -> bool

True if the file should be in append mode.

Source

fn is_truncate(&self) -> bool

True if the file should be truncated.

Source

fn create_directory(&self) -> bool

If creating an object, Whether to create a directory.

Source

fn is_node(&self) -> bool

True if the protocol should be a limited node connection.

Implementations on Foreign Types§

Source§

impl ProtocolsExt for Flags

Source§

impl ProtocolsExt for OpenFlags

Source§

fn to_directory_options(&self) -> Result<DirectoryOptions, Status>

Checks flags provided for a new directory connection. Returns directory options (cleaning up some ambiguities) or an error, in case new new connection flags are not permitting the connection to be opened.

Changing this function can be dangerous! Flags operations may have security implications.

Source§

fn is_dir_allowed(&self) -> bool

Source§

fn is_file_allowed(&self) -> bool

Source§

fn is_any_node_protocol_allowed(&self) -> bool

Source§

fn creation_mode(&self) -> CreationMode

Source§

fn rights(&self) -> Option<Operations>

Source§

fn to_service_options(&self) -> Result<ServiceOptions, Status>

Source§

fn get_representation(&self) -> bool

Source§

fn is_append(&self) -> bool

Source§

fn is_truncate(&self) -> bool

Source§

fn create_directory(&self) -> bool

Source§

fn is_node(&self) -> bool

Implementors§