pub struct GenderBag {
size: usize,
mask: u32,
resolved: Gender,
}
Expand description
A collection of genders.
Fields§
§size: usize
§mask: u32
§resolved: Gender
Implementations§
Source§impl GenderBag
impl GenderBag
Sourcepub fn merge_from(&mut self, bag: &GenderBag)
pub fn merge_from(&mut self, bag: &GenderBag)
Merge another gender bag into this one.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Get the number of gender entries recorded to make this gender record.
Sourcepub fn maybe_gender(&self) -> Option<&Gender>
pub fn maybe_gender(&self) -> Option<&Gender>
Get the gender, returning None if no genders are seen.
Sourcepub fn to_gender(&self) -> &Gender
pub fn to_gender(&self) -> &Gender
Get the gender, returning Gender::Unknown if no genders are seen.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GenderBag
impl RefUnwindSafe for GenderBag
impl Send for GenderBag
impl Sync for GenderBag
impl Unpin for GenderBag
impl UnwindSafe for GenderBag
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