Enum fastobo::ast::HeaderClause
source · pub enum HeaderClause {
Show 22 variants
FormatVersion(Box<UnquotedString>),
DataVersion(Box<UnquotedString>),
Date(Box<NaiveDateTime>),
SavedBy(Box<UnquotedString>),
AutoGeneratedBy(Box<UnquotedString>),
Import(Box<Import>),
Subsetdef(Box<SubsetIdent>, Box<QuotedString>),
SynonymTypedef(Box<SynonymTypeIdent>, Box<QuotedString>, Option<Box<SynonymScope>>),
DefaultNamespace(Box<NamespaceIdent>),
NamespaceIdRule(Box<UnquotedString>),
Idspace(Box<IdentPrefix>, Box<Url>, Option<Box<QuotedString>>),
TreatXrefsAsEquivalent(Box<IdentPrefix>),
TreatXrefsAsGenusDifferentia(Box<IdentPrefix>, Box<RelationIdent>, Box<ClassIdent>),
TreatXrefsAsReverseGenusDifferentia(Box<IdentPrefix>, Box<RelationIdent>, Box<ClassIdent>),
TreatXrefsAsRelationship(Box<IdentPrefix>, Box<RelationIdent>),
TreatXrefsAsIsA(Box<IdentPrefix>),
TreatXrefsAsHasSubclass(Box<IdentPrefix>),
PropertyValue(Box<PropertyValue>),
Remark(Box<UnquotedString>),
Ontology(Box<UnquotedString>),
OwlAxioms(Box<UnquotedString>),
Unreserved(Box<UnquotedString>, Box<UnquotedString>),
}
Expand description
A clause appearing in a header frame.
Header clauses are used to add metadata to OBO documents. They are all
optional, but every document should at least contain a FormatVersion
clause, to help with interoperability and to make sure the semantics of
the right OBO specification are in use.
Comparison
HeaderClause
implements PartialOrd
following the semantics of the OBO
specification: clauses will compare based on their serialization order
rather than on their alphabetic order; clauses of the same kind will be
ranked in the alphabetic order.
Variants§
FormatVersion(Box<UnquotedString>)
DataVersion(Box<UnquotedString>)
Date(Box<NaiveDateTime>)
SavedBy(Box<UnquotedString>)
AutoGeneratedBy(Box<UnquotedString>)
Import(Box<Import>)
Subsetdef(Box<SubsetIdent>, Box<QuotedString>)
SynonymTypedef(Box<SynonymTypeIdent>, Box<QuotedString>, Option<Box<SynonymScope>>)
DefaultNamespace(Box<NamespaceIdent>)
NamespaceIdRule(Box<UnquotedString>)
Idspace(Box<IdentPrefix>, Box<Url>, Option<Box<QuotedString>>)
TreatXrefsAsEquivalent(Box<IdentPrefix>)
TreatXrefsAsGenusDifferentia(Box<IdentPrefix>, Box<RelationIdent>, Box<ClassIdent>)
TreatXrefsAsReverseGenusDifferentia(Box<IdentPrefix>, Box<RelationIdent>, Box<ClassIdent>)
TreatXrefsAsRelationship(Box<IdentPrefix>, Box<RelationIdent>)
TreatXrefsAsIsA(Box<IdentPrefix>)
TreatXrefsAsHasSubclass(Box<IdentPrefix>)
PropertyValue(Box<PropertyValue>)
Remark(Box<UnquotedString>)
Ontology(Box<UnquotedString>)
OwlAxioms(Box<UnquotedString>)
Unreserved(Box<UnquotedString>, Box<UnquotedString>)
Trait Implementations§
source§impl Clone for HeaderClause
impl Clone for HeaderClause
source§fn clone(&self) -> HeaderClause
fn clone(&self) -> HeaderClause
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HeaderClause
impl Debug for HeaderClause
source§impl Display for HeaderClause
impl Display for HeaderClause
source§impl From<HeaderClause> for HeaderFrame
impl From<HeaderClause> for HeaderFrame
source§fn from(clause: HeaderClause) -> Self
fn from(clause: HeaderClause) -> Self
Converts to this type from the input type.
source§impl FromIterator<HeaderClause> for HeaderFrame
impl FromIterator<HeaderClause> for HeaderFrame
source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = HeaderClause>,
fn from_iter<T>(iter: T) -> Selfwhere T: IntoIterator<Item = HeaderClause>,
Creates a value from an iterator. Read more
source§impl<'i> FromPair<'i> for HeaderClause
impl<'i> FromPair<'i> for HeaderClause
source§impl FromStr for HeaderClause
impl FromStr for HeaderClause
source§impl Hash for HeaderClause
impl Hash for HeaderClause
source§impl OboClause for HeaderClause
impl OboClause for HeaderClause
source§fn cardinality(&self) -> Cardinality
fn cardinality(&self) -> Cardinality
Get the cardinality expected for a clause variant. Read more
source§impl Ord for HeaderClause
impl Ord for HeaderClause
source§fn cmp(&self, other: &HeaderClause) -> Ordering
fn cmp(&self, other: &HeaderClause) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<HeaderClause> for HeaderClause
impl PartialEq<HeaderClause> for HeaderClause
source§fn eq(&self, other: &HeaderClause) -> bool
fn eq(&self, other: &HeaderClause) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<HeaderClause> for HeaderClause
impl PartialOrd<HeaderClause> for HeaderClause
source§fn partial_cmp(&self, other: &HeaderClause) -> Option<Ordering>
fn partial_cmp(&self, other: &HeaderClause) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for HeaderClause
impl StructuralEq for HeaderClause
impl StructuralPartialEq for HeaderClause
Auto Trait Implementations§
impl RefUnwindSafe for HeaderClause
impl Send for HeaderClause
impl Sync for HeaderClause
impl Unpin for HeaderClause
impl UnwindSafe for HeaderClause
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