pub struct Link {
pub index: u32,
pub source: u32,
pub target: u32,
}Expand description
Link represents a doublet (source, target) pair with an index
Fields§
§index: u32§source: u32§target: u32Implementations§
Source§impl Link
impl Link
Sourcepub fn new(index: u32, source: u32, target: u32) -> Self
pub fn new(index: u32, source: u32, target: u32) -> Self
Creates a new link with the given index, source, and target
Sourcepub fn is_full_point(&self) -> bool
pub fn is_full_point(&self) -> bool
Returns true if this is a full point (self-referential link)
Sourcepub fn is_partial_point(&self) -> bool
pub fn is_partial_point(&self) -> bool
Returns true if this link references itself from at least one side.
Trait Implementations§
Source§impl From<Link<u32>> for Link
impl From<Link<u32>> for Link
Source§fn from(link: DoubletsLink) -> Self
fn from(link: DoubletsLink) -> Self
Converts to this type from the input type.
Source§impl From<Link> for DoubletsLink
impl From<Link> for DoubletsLink
impl Copy for Link
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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