pub struct HpoTerm<'a> { /* private fields */ }
Expand description
The HpoTerm
represents a single term from the HP Ontology
The term holds all required information and relationship data. It provides functionality for path traversals and similarity calculations.
Implementations§
source§impl<'a> HpoTerm<'a>
impl<'a> HpoTerm<'a>
sourcepub fn try_new(
ontology: &'a Ontology,
term: HpoTermId
) -> HpoResult<HpoTerm<'a>>
pub fn try_new( ontology: &'a Ontology, term: HpoTermId ) -> HpoResult<HpoTerm<'a>>
Constructs a new HpoTerm
Errors
If the given HpoTermId
does not match an existing term
it returns an Error
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 118u32.into());
assert!(term.is_ok());
let non_existing_term = HpoTerm::try_new(&ontology, 666666666u32.into());
assert!(non_existing_term.is_err());
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name of the term
e.g.: Abnormality of the nervous system
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
assert_eq!(term.name(), "Phenotypic abnormality");
sourcepub fn parent_ids(&self) -> &HpoGroup
pub fn parent_ids(&self) -> &HpoGroup
sourcepub fn parents(&self) -> Iter<'a> ⓘ
pub fn parents(&self) -> Iter<'a> ⓘ
Returns an iterator of the direct patients of the term
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
assert_eq!(term.parents().count(), 1);
for parent in term.parents() {
println!("{}", parent.name());
}
sourcepub fn all_parent_ids(&self) -> &HpoGroup
pub fn all_parent_ids(&self) -> &HpoGroup
sourcepub fn all_parents(&self) -> Iter<'a> ⓘ
pub fn all_parents(&self) -> Iter<'a> ⓘ
Returns an iterator of the direct and indrect patients of the term
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
assert_eq!(term.all_parents().count(), 3);
for parent in term.all_parents() {
println!("{}", parent.name());
}
sourcepub fn children_ids(&self) -> &HpoGroup
pub fn children_ids(&self) -> &HpoGroup
sourcepub fn children(&self) -> Iter<'a> ⓘ
pub fn children(&self) -> Iter<'a> ⓘ
Returns an iterator of the direct children of the term
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
for child in term.children() {
println!("{}", child.name());
}
sourcepub fn all_common_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
pub fn all_common_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
Returns the HpoTermId
s that are parents of both self
and other
Note:
This method includes self
and other
into their corresponding
parent-id list so that if one term is a parent term of the other,
it is included. It also means that self
is included if self == other
.
This might seem counter-intuitive at first, but in most cases this is what is actually needed
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let common_ancestors = term1.all_common_ancestor_ids(&term2);
assert_eq!(common_ancestors.len(), 3);
assert!(!common_ancestors.contains(&11017u32.into()));
assert!(!common_ancestors.contains(&25454u32.into()));
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let common_ancestors = term1.all_common_ancestor_ids(&term2);
assert_eq!(common_ancestors.len(), 3);
assert!(!common_ancestors.contains(&11017u32.into()));
assert!(common_ancestors.contains(&1939u32.into()));
sourcepub fn common_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
pub fn common_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
Returns the HpoTermId
s that are parents of both self
and other
Note:
This method does not include self
and other
. Depending on your
use case, you might prefer HpoTerm::all_common_ancestor_ids
.
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let common_ancestors = term1.common_ancestor_ids(&term2);
assert_eq!(common_ancestors.len(), 3);
assert!(!common_ancestors.contains(&11017u32.into()));
assert!(!common_ancestors.contains(&25454u32.into()));
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let common_ancestors = term1.common_ancestor_ids(&term2);
assert_eq!(common_ancestors.len(), 2);
assert!(!common_ancestors.contains(&11017u32.into()));
assert!(!common_ancestors.contains(&1939u32.into()));
sourcepub fn all_union_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
pub fn all_union_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
Returns the HpoTermId
s that are parents of either self
or other
Note:
This method includes self
and other
into their corresponding
parent-id list so that both are included themselves as well.
This might seem counter-intuitive at first, but in many cases this is what is actually needed
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestor_ids(&term2);
assert_eq!(union_ancestors.len(), 4);
assert!(!union_ancestors.contains(&11017u32.into()));
assert!(!union_ancestors.contains(&12639u32.into()));
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestor_ids(&term2);
assert_eq!(union_ancestors.len(), 3);
assert!(!union_ancestors.contains(&11017u32.into()));
assert!(union_ancestors.contains(&1939u32.into()));
sourcepub fn union_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
pub fn union_ancestor_ids(&self, other: &HpoTerm<'_>) -> HpoGroup
Returns the HpoTermId
s that are parents of either self
or other
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestor_ids(&term2);
assert_eq!(union_ancestors.len(), 4);
assert!(!union_ancestors.contains(&11017u32.into()));
assert!(!union_ancestors.contains(&12639u32.into()));
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestor_ids(&term2);
assert_eq!(union_ancestors.len(), 3);
assert!(!union_ancestors.contains(&11017u32.into()));
assert!(union_ancestors.contains(&1939u32.into()));
sourcepub fn all_common_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
pub fn all_common_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
Returns an iterator of HpoTerm
s that are parents of both self
and other
Note:
This method includes self
and other
into their corresponding
parent-id list so that if one term is a parent term of the other,
it is included. It also means that self
is included if self == other
.
This might seem counter-intuitive at first, but in most cases this is what is actually needed
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let common_ancestors = term1.all_common_ancestors(&term2);
assert_eq!(common_ancestors.len(), 3);
for term in &common_ancestors {
println!("{}", term.name());
}
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let common_ancestors = term1.all_common_ancestors(&term2);
assert_eq!(common_ancestors.len(), 3);
for term in &common_ancestors {
println!("{}", term.name());
}
sourcepub fn common_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
pub fn common_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
Returns an iterator of HpoTerm
s that are parents of both self
and other
Note:
This method does not include self
and other
. Depending on your
use case, you might prefer [HpoTerm.all_common_ancestor_ids
].
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let common_ancestors = term1.common_ancestors(&term2);
assert_eq!(common_ancestors.len(), 3);
for term in &common_ancestors {
println!("{}", term.name());
}
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let common_ancestors = term1.common_ancestors(&term2);
assert_eq!(common_ancestors.len(), 2);
for term in &common_ancestors {
println!("{}", term.name());
}
sourcepub fn all_union_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
pub fn all_union_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
Returns an iterator of HpoTerm
s that are parents of either self
or other
Note:
This method includes self
and other
into their corresponding
parent-id list so that both are included themselves as well.
This might seem counter-intuitive at first, but in many cases this is what is actually needed
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestors(&term2);
assert_eq!(union_ancestors.len(), 4);
for term in &union_ancestors {
println!("{}", term.name());
}
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let union_ancestors = term1.all_union_ancestors(&term2);
assert_eq!(union_ancestors.len(), 3);
for term in &union_ancestors {
println!("{}", term.name());
}
sourcepub fn union_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
pub fn union_ancestors(&self, other: &HpoTerm<'_>) -> Combined<'_>
Returns an iterator of HpoTerm
s that are parents of either self
or other
Examples
Note:
Check out the crate::Ontology
documentation to see the example ontology
Test-case 1: Terms do not have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(!term2.parent_of(&term1));
let union_ancestors = term1.union_ancestors(&term2);
assert_eq!(union_ancestors.len(), 4);
for term in &union_ancestors {
println!("{}", term.name());
}
Test-case 2: Terms do have a parent - child relationship
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
let union_ancestors = term1.union_ancestors(&term2);
assert_eq!(union_ancestors.len(), 3);
for term in &union_ancestors {
println!("{}", term.name());
}
sourcepub fn genes(&self) -> GeneIterator<'a> ⓘ
pub fn genes(&self) -> GeneIterator<'a> ⓘ
Returns an iterator of all associated crate::annotations::Gene
s
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
for gene in term.genes() {
println!("{}", gene.name());
}
sourcepub fn gene_ids(&self) -> &Genes
pub fn gene_ids(&self) -> &Genes
Returns the set of all associated crate::annotations::Gene
s
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
assert_eq!(term.gene_ids().len(), 575);
sourcepub fn omim_diseases(&self) -> OmimDiseaseIterator<'a> ⓘ
pub fn omim_diseases(&self) -> OmimDiseaseIterator<'a> ⓘ
Returns an iterator of all associated crate::annotations::OmimDisease
s
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
for disease in term.omim_diseases() {
println!("{}", disease.name());
}
sourcepub fn omim_disease_ids(&self) -> &OmimDiseases
pub fn omim_disease_ids(&self) -> &OmimDiseases
Returns the set of all associated crate::annotations::OmimDisease
s
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
assert_eq!(term.omim_disease_ids().len(), 143);
sourcepub fn information_content(&self) -> &InformationContent
pub fn information_content(&self) -> &InformationContent
Returns the InformationContent
of the term
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term = HpoTerm::try_new(&ontology, 1939u32.into()).unwrap();
let ic = term.information_content();
assert_eq!(ic.gene(), 0.6816717);
assert_eq!(ic.omim_disease(), 3.4335358);
sourcepub fn similarity_score(
&self,
other: &HpoTerm<'_>,
similarity: &impl Similarity
) -> f32
pub fn similarity_score( &self, other: &HpoTerm<'_>, similarity: &impl Similarity ) -> f32
Calculates the similarity of self
and other
using the provided Similarity
algorithm
Examples
use hpo::{HpoTerm, Ontology};
use hpo::similarity::Builtins;
use hpo::term::InformationContentKind;
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 11017u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
let sim = term1.similarity_score(&term2, &Builtins::GraphIc(InformationContentKind::Omim));
assert_eq!(sim, 0.2765914);
sourcepub fn distance_to_ancestor(&self, other: &HpoTerm<'_>) -> Option<usize>
pub fn distance_to_ancestor(&self, other: &HpoTerm<'_>) -> Option<usize>
Returns the distance (steps) from self
to other
, if other
is a parent of self
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
let term3 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert_eq!(term1.distance_to_ancestor(&term2), Some(2));
assert_eq!(term2.distance_to_ancestor(&term1), None);
assert_eq!(term1.distance_to_ancestor(&term3), None);
sourcepub fn child_of(&self, other: &HpoTerm<'_>) -> bool
pub fn child_of(&self, other: &HpoTerm<'_>) -> bool
Returns true
if self
is a child (direct or indirect) of other
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
assert!(term1.child_of(&term2));
assert!(!term2.child_of(&term1));
sourcepub fn parent_of(&self, other: &HpoTerm<'_>) -> bool
pub fn parent_of(&self, other: &HpoTerm<'_>) -> bool
Returns true
if self
is a parent (direct or indirect) of other
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
assert!(!term1.parent_of(&term2));
assert!(term2.parent_of(&term1));
sourcepub fn path_to_ancestor(&self, other: &HpoTerm<'_>) -> Option<Vec<HpoTermId>>
pub fn path_to_ancestor(&self, other: &HpoTerm<'_>) -> Option<Vec<HpoTermId>>
Returns the shortest path to traverse from self
ot other
, if other
is a parent of self
Examples
use hpo::{HpoTerm, HpoTermId, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
assert_eq!(
term1.path_to_ancestor(&term2).unwrap(),
vec![
HpoTermId::try_from("HP:0001939").unwrap(),
HpoTermId::try_from("HP:0000118").unwrap()
]
);
assert_eq!(term2.path_to_ancestor(&term1), None);
sourcepub fn distance_to_term(&self, other: &HpoTerm<'_>) -> Option<usize>
pub fn distance_to_term(&self, other: &HpoTerm<'_>) -> Option<usize>
Returns the distance (steps) from self
to other
Examples
use hpo::{HpoTerm, Ontology};
let ontology = Ontology::from_binary("tests/example.hpo").unwrap();
let term1 = HpoTerm::try_new(&ontology, 25454u32.into()).unwrap();
let term2 = HpoTerm::try_new(&ontology, 118u32.into()).unwrap();
let term3 = HpoTerm::try_new(&ontology, 12639u32.into()).unwrap();
assert_eq!(term1.distance_to_term(&term2), Some(2));
assert_eq!(term2.distance_to_term(&term1), Some(2));
assert_eq!(term1.distance_to_term(&term3), Some(4));
sourcepub fn replaced_by(&self) -> Option<HpoTerm<'a>>
pub fn replaced_by(&self) -> Option<HpoTerm<'a>>
Returns the replacement term, if it exists
Returns None
otherwise
If a term has multiple replaced_by
annotations only one annotation
is selected as replacement. Usually the last one, if parsing from an obo
file.
sourcepub fn replacement_id(&self) -> Option<HpoTermId>
pub fn replacement_id(&self) -> Option<HpoTermId>
Returns the HpoTermId
of an replacement term, if it exists
Returns None
otherwise
If a term has multiple replaced_by
annotations only one annotation
is selected as replacement. Usually the last one, if parsing from an obo
file.
Trait Implementations§
source§impl<'a> FromIterator<HpoTerm<'a>> for HpoGroup
impl<'a> FromIterator<HpoTerm<'a>> for HpoGroup
source§impl PartialEq<HpoTerm<'_>> for HpoTerm<'_>
impl PartialEq<HpoTerm<'_>> for HpoTerm<'_>
impl<'a> Copy for HpoTerm<'a>
impl Eq for HpoTerm<'_>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for HpoTerm<'a>
impl<'a> Send for HpoTerm<'a>
impl<'a> Sync for HpoTerm<'a>
impl<'a> Unpin for HpoTerm<'a>
impl<'a> UnwindSafe for HpoTerm<'a>
Blanket Implementations§
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>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.