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.