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 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_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_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.
Auto Trait Implementations§
impl Freeze for Rights
impl RefUnwindSafe for Rights
impl Send for Rights
impl Sync for Rights
impl Unpin for Rights
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more
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> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]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>
Converts
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>
Converts
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