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.
Auto Trait Implementations§
impl Freeze for Rights
impl RefUnwindSafe for Rights
impl Send for Rights
impl Sync for Rights
impl Unpin for Rights
impl UnwindSafe for Rights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more