pub enum PersonReference {
Short(String),
Full(Person),
}
Expand description
A reference to a person.
Variants§
Short(String)
A short reference.
Short references have a fixed format of John Doe <john@doe.dev> (https://john.doe.dev)
.
Full(Person)
A full reference.
This type of reference defines the parts using a struct instead of a shorthand string format.
Trait Implementations§
Source§impl Clone for PersonReference
impl Clone for PersonReference
Source§fn clone(&self) -> PersonReference
fn clone(&self) -> PersonReference
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PersonReference
impl Debug for PersonReference
Source§impl<'de> Deserialize<'de> for PersonReference
impl<'de> Deserialize<'de> for PersonReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PersonReference
impl PartialEq for PersonReference
Source§impl Serialize for PersonReference
impl Serialize for PersonReference
impl Eq for PersonReference
impl StructuralPartialEq for PersonReference
Auto Trait Implementations§
impl Freeze for PersonReference
impl RefUnwindSafe for PersonReference
impl Send for PersonReference
impl Sync for PersonReference
impl Unpin for PersonReference
impl UnwindSafe for PersonReference
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