Struct hpo::comparison::HpoTermDelta
source · pub struct HpoTermDelta { /* private fields */ }
Expand description
Differences between two HpoTerm
s
Implementations§
source§impl HpoTermDelta
impl HpoTermDelta
sourcepub fn new(lhs: HpoTerm<'_>, rhs: HpoTerm<'_>) -> Option<Self>
pub fn new(lhs: HpoTerm<'_>, rhs: HpoTerm<'_>) -> Option<Self>
Constructs a new HpoTermDelta
by comparing two HpoTerm
s
Returns None
if both are identical
sourcepub fn added_parents(&self) -> Option<&Vec<HpoTermId>>
pub fn added_parents(&self) -> Option<&Vec<HpoTermId>>
Returns all direct parent HpoTermId
s of the new
term that
are not parents of the old
term
Returns None
if no such terms exist
sourcepub fn removed_parents(&self) -> Option<&Vec<HpoTermId>>
pub fn removed_parents(&self) -> Option<&Vec<HpoTermId>>
Returns all direct parent HpoTermId
s of the old
term that
are not parents of the new
term
Returns None
if no such terms exist
sourcepub fn changed_name(&self) -> Option<&(String, String)>
pub fn changed_name(&self) -> Option<&(String, String)>
Returns the old
and new
name if they are different
Returns None
if the name is unchanged
sourcepub fn changed_obsolete(&self) -> Option<(bool, bool)>
pub fn changed_obsolete(&self) -> Option<(bool, bool)>
Returns the old
and new
obsolete states if they are different
Returns None
if the obsolete state is unchanged
Auto Trait Implementations§
impl Freeze for HpoTermDelta
impl RefUnwindSafe for HpoTermDelta
impl Send for HpoTermDelta
impl Sync for HpoTermDelta
impl Unpin for HpoTermDelta
impl UnwindSafe for HpoTermDelta
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.