pub struct Relationships { /* private fields */ }Expand description
A node’s relationships, in insertion order like a JS object’s keys. Nodes carry a handful at most, so lookups are linear.
Implementations§
Source§impl Relationships
impl Relationships
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn names(&self) -> Vec<&str>
pub fn get(&self, name: &str) -> Option<&RelationshipStream>
Sourcepub fn set(&mut self, name: &str, stream: Option<RelationshipStream>)
pub fn set(&mut self, name: &str, stream: Option<RelationshipStream>)
Sets, replaces (keeping its position), or with None removes the
relationship name.
Sourcepub fn merging(&self, other: &Relationships) -> Relationships
pub fn merging(&self, other: &Relationships) -> Relationships
{...self, ...other}: other wins, keys keep their first position.
pub fn iter(&self) -> impl Iterator<Item = (&str, &RelationshipStream)>
Trait Implementations§
Source§impl Clone for Relationships
impl Clone for Relationships
Auto Trait Implementations§
impl !RefUnwindSafe for Relationships
impl !Send for Relationships
impl !Sync for Relationships
impl !UnwindSafe for Relationships
impl Forget for Relationships
impl Freeze for Relationships
impl Move for Relationships
impl Unpin for Relationships
impl UnsafeUnpin for Relationships
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