pub struct GroupMemberFlagsBuilder { /* private fields */ }Expand description
A builder for the bitfield.
Implementations§
Source§impl GroupMemberFlagsBuilder
impl GroupMemberFlagsBuilder
Sourcepub const fn new_without_defaults() -> Self
pub const fn new_without_defaults() -> Self
Creates a new bitfield builder instance without respecting defaults.
Sourcepub const fn with_is_self(self, bits: bool) -> Self
pub const fn with_is_self(self, bits: bool) -> Self
Sets builder bit 0.
Sourcepub const fn checked_with_is_self(
self,
bits: bool,
) -> Result<Self, &'static str>
pub const fn checked_with_is_self( self, bits: bool, ) -> Result<Self, &'static str>
Sets builder bit 0.
Sourcepub const fn with_is_in_instance(self, bits: bool) -> Self
pub const fn with_is_in_instance(self, bits: bool) -> Self
Sets builder bit 1.
Sourcepub const fn checked_with_is_in_instance(
self,
bits: bool,
) -> Result<Self, &'static str>
pub const fn checked_with_is_in_instance( self, bits: bool, ) -> Result<Self, &'static str>
Sets builder bit 1.
Sourcepub const fn with_is_commander(self, bits: bool) -> Self
pub const fn with_is_commander(self, bits: bool) -> Self
Sets builder bit 2.
Sourcepub const fn checked_with_is_commander(
self,
bits: bool,
) -> Result<Self, &'static str>
pub const fn checked_with_is_commander( self, bits: bool, ) -> Result<Self, &'static str>
Sets builder bit 2.
Sourcepub const fn with_is_lieutenant(self, bits: bool) -> Self
pub const fn with_is_lieutenant(self, bits: bool) -> Self
Sets builder bit 3.
Sourcepub const fn checked_with_is_lieutenant(
self,
bits: bool,
) -> Result<Self, &'static str>
pub const fn checked_with_is_lieutenant( self, bits: bool, ) -> Result<Self, &'static str>
Sets builder bit 3.
Sourcepub const fn build(self) -> GroupMemberFlags
pub const fn build(self) -> GroupMemberFlags
Builds a bitfield instance from the builder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GroupMemberFlagsBuilder
impl RefUnwindSafe for GroupMemberFlagsBuilder
impl Send for GroupMemberFlagsBuilder
impl Sync for GroupMemberFlagsBuilder
impl Unpin for GroupMemberFlagsBuilder
impl UnsafeUnpin for GroupMemberFlagsBuilder
impl UnwindSafe for GroupMemberFlagsBuilder
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