Trait vfs::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§