pub struct Relation { /* private fields */ }
Expand description
Snapshot of a relationship within a graph database
Implementations§
source§impl Relation
impl Relation
pub fn new(inner: BoltRelation) -> Self
pub fn id(&self) -> i64
pub fn start_node_id(&self) -> i64
pub fn end_node_id(&self) -> i64
pub fn typ(&self) -> &str
sourcepub fn get<'this, T>(&'this self, key: &str) -> Result<T, DeError>where
T: Deserialize<'this>,
pub fn get<'this, T>(&'this self, key: &str) -> Result<T, DeError>where
T: Deserialize<'this>,
Get an attribute of this relationship and deserialize it into custom type that implements serde::Deserialize
sourcepub fn to<'this, T>(&'this self) -> Result<T, DeError>where
T: Deserialize<'this>,
pub fn to<'this, T>(&'this self) -> Result<T, DeError>where
T: Deserialize<'this>,
Deserialize the relationship into custom type that implements serde::Deserialize
Trait Implementations§
source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 Relation
impl PartialEq for Relation
impl StructuralPartialEq for Relation
Auto Trait Implementations§
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnwindSafe for Relation
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