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§
sourcefn is_dir_allowed(&self) -> bool
fn is_dir_allowed(&self) -> bool
True if the directory protocol is allowed.
sourcefn is_file_allowed(&self) -> bool
fn is_file_allowed(&self) -> bool
True if the file protocol is allowed.
sourcefn is_symlink_allowed(&self) -> bool
fn is_symlink_allowed(&self) -> bool
True if the symlink protocol is allowed.
sourcefn is_any_node_protocol_allowed(&self) -> bool
fn is_any_node_protocol_allowed(&self) -> bool
True if any node protocol is allowed.
sourcefn creation_mode(&self) -> CreationMode
fn creation_mode(&self) -> CreationMode
The creation mode for the connection.
sourcefn rights(&self) -> Option<Operations>
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.
sourcefn to_directory_options(&self) -> Result<DirectoryOptions, Status>
fn to_directory_options(&self) -> Result<DirectoryOptions, Status>
Convert to directory options. Returns an error if the request does not permit a directory.
sourcefn to_symlink_options(&self) -> Result<SymlinkOptions, Status>
fn to_symlink_options(&self) -> Result<SymlinkOptions, Status>
Convert to symlink options. Returns an error if the request does not permit a symlink.
sourcefn to_service_options(&self) -> Result<ServiceOptions, Status>
fn to_service_options(&self) -> Result<ServiceOptions, Status>
Convert to service options. Returns an error if the request is not valid for a service.
sourcefn get_representation(&self) -> bool
fn get_representation(&self) -> bool
True if REPRESENTATION is desired.
sourcefn is_truncate(&self) -> bool
fn is_truncate(&self) -> bool
True if the file should be truncated.
sourcefn create_directory(&self) -> bool
fn create_directory(&self) -> bool
If creating an object, Whether to create a directory.
Implementations on Foreign Types§
source§impl ProtocolsExt for Flags
impl ProtocolsExt for Flags
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
source§impl ProtocolsExt for OpenFlags
impl ProtocolsExt for OpenFlags
source§fn to_directory_options(&self) -> Result<DirectoryOptions, Status>
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.