pub enum RelationType {
WorksAt,
Knows,
Manages,
RelatesTo,
Prefers,
PartOf,
}Expand description
Types of relations between entities.
TigerStyle: Exhaustive enum prevents invalid states.
Variants§
WorksAt
Person works at organization
Knows
Person knows person
Manages
Person manages project
RelatesTo
Generic relation
Prefers
User prefers something
PartOf
Entity is part of another
Implementations§
Source§impl RelationType
impl RelationType
Sourcepub fn all() -> &'static [RelationType]
pub fn all() -> &'static [RelationType]
Get all relation types.
Sourcepub fn from_str_or_relates_to(s: &str) -> Self
pub fn from_str_or_relates_to(s: &str) -> Self
Parse from string, defaulting to RelatesTo for unknown types.
Trait Implementations§
Source§impl Clone for RelationType
impl Clone for RelationType
Source§fn clone(&self) -> RelationType
fn clone(&self) -> RelationType
Returns a duplicate 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 RelationType
impl Debug for RelationType
Source§impl Default for RelationType
impl Default for RelationType
Source§impl<'de> Deserialize<'de> for RelationType
impl<'de> Deserialize<'de> for RelationType
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 Display for RelationType
impl Display for RelationType
Source§impl Hash for RelationType
impl Hash for RelationType
Source§impl PartialEq for RelationType
impl PartialEq for RelationType
Source§impl Serialize for RelationType
impl Serialize for RelationType
impl Copy for RelationType
impl Eq for RelationType
impl StructuralPartialEq for RelationType
Auto Trait Implementations§
impl Freeze for RelationType
impl RefUnwindSafe for RelationType
impl Send for RelationType
impl Sync for RelationType
impl Unpin for RelationType
impl UnwindSafe for RelationType
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