pub struct GenderValue {
pub sex: Option<Sex>,
pub identity: Option<String>,
}Expand description
The structured value of the GENDER property.
Fields§
§sex: Option<Sex>The sex component.
identity: Option<String>The free-form gender identity component.
Trait Implementations§
Source§impl Clone for GenderValue
impl Clone for GenderValue
Source§impl Debug for GenderValue
impl Debug for GenderValue
Source§impl Default for GenderValue
impl Default for GenderValue
Source§impl Display for GenderValue
impl Display for GenderValue
impl Eq for GenderValue
Source§impl FromStr for GenderValue
impl FromStr for GenderValue
Source§impl Hash for GenderValue
impl Hash for GenderValue
Source§impl PartialEq for GenderValue
impl PartialEq for GenderValue
Source§impl PropertyValue for GenderValue
impl PropertyValue for GenderValue
Source§fn write_value(&self, w: &mut FoldingWriter<'_>) -> Result
fn write_value(&self, w: &mut FoldingWriter<'_>) -> Result
Writes the value part of the content line, applying any escaping the value type needs.
Source§fn parse_value(
raw: &str,
value_type: Option<&str>,
) -> Result<Self, InvalidValueError>
fn parse_value( raw: &str, value_type: Option<&str>, ) -> Result<Self, InvalidValueError>
Parses the raw value text of a content line, guided by the lowercase VALUE parameter if one exists.
It fails when the VALUE parameter names a value type that this value does not support.
Source§fn explicit_value_type(&self) -> Option<&'static str>
fn explicit_value_type(&self) -> Option<&'static str>
Returns the VALUE parameter to write when this value is not the default type of the property.
impl StructuralPartialEq for GenderValue
Auto Trait Implementations§
impl Freeze for GenderValue
impl RefUnwindSafe for GenderValue
impl Send for GenderValue
impl Sync for GenderValue
impl Unpin for GenderValue
impl UnsafeUnpin for GenderValue
impl UnwindSafe for GenderValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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