pub struct Rights { /* private fields */ }
Expand description
Helper struct that encapsulates generation of valid/invalid sets of flags based on which rights are supported by a particular node type.
Implementations§
Source§impl Rights
impl Rights
Sourcepub fn new(rights: Rights) -> Rights
pub fn new(rights: Rights) -> Rights
Creates a new Rights struct based on the rights in specified in fio::Rights
.
Sourcepub fn all_rights(&self) -> Rights
pub fn all_rights(&self) -> Rights
Returns all supported rights.
Sourcepub fn all_flags_deprecated(&self) -> OpenFlags
pub fn all_flags_deprecated(&self) -> OpenFlags
Returns all supported rights as fio::OpenFlags
flags.
Sourcepub fn rights_combinations(&self) -> Vec<Rights>
pub fn rights_combinations(&self) -> Vec<Rights>
Returns a vector of all valid rights combinations.
Sourcepub fn combinations(&self) -> Vec<Flags>
pub fn combinations(&self) -> Vec<Flags>
Returns a vector of all valid flag combinations as fio::Flags
flags.
Sourcepub fn combinations_deprecated(&self) -> Vec<OpenFlags>
pub fn combinations_deprecated(&self) -> Vec<OpenFlags>
Returns a vector of all valid rights combinations as fio::OpenFlags
flags.
Sourcepub fn combinations_containing(&self, with_rights: Rights) -> Vec<Flags>
pub fn combinations_containing(&self, with_rights: Rights) -> Vec<Flags>
Returns all rights combinations that include all the specified rights in with_rights
as
fio::Flags
flags. Will be empty if none of the requested rights are supported.
Sourcepub fn combinations_containing_deprecated(
&self,
with_rights: Rights,
) -> Vec<OpenFlags>
pub fn combinations_containing_deprecated( &self, with_rights: Rights, ) -> Vec<OpenFlags>
Returns all rights combinations that include all the specified rights in with_rights
as
`fio::OpenFlags``. Will be empty if none of the requested rights are supported.
Sourcepub fn combinations_without(&self, without_rights: Rights) -> Vec<Flags>
pub fn combinations_without(&self, without_rights: Rights) -> Vec<Flags>
Returns all rights combinations that does not include the specified rights in
without_rights
as fio::Flags
flags. Will be empty if none are supported.
Sourcepub fn combinations_without_deprecated(
&self,
without_rights: Rights,
) -> Vec<OpenFlags>
pub fn combinations_without_deprecated( &self, without_rights: Rights, ) -> Vec<OpenFlags>
Returns all rights combinations that does not include the specified rights in
without_rights
as fio::OpenFlags
flags. Will be empty if none are supported.