[−][src]Struct fastobo::ast::Xref
A database cross-reference definition.
Cross-references can be used in Def
or Synonym
clauses of entity
frames to add sources for the provided definition or evidence to show the
actual existence of a synonym. They can also be found in Xref
clauses
when the cross-reference is directly relevant to the annotated entity
(e.g. when exporting an ontology from a knowledge-base to add an hyperlink
to the original resource).
Methods
impl Xref
[src]
pub fn new<I>(id: I) -> Self where
I: Into<Ident>,
[src]
I: Into<Ident>,
Create a new Xref
from the given ID, without description.
pub fn with_desc<I, D>(id: I, desc: D) -> Self where
I: Into<Ident>,
D: Into<Option<QuotedString>>,
[src]
I: Into<Ident>,
D: Into<Option<QuotedString>>,
Create a new Xref
with the given ID and optional description.
pub fn id(&self) -> &Ident
[src]
Get a mutable reference to the identifier of the xref.
pub fn id_mut(&mut self) -> &mut Ident
[src]
Get a reference to the identifier of the xref.
pub fn description(&self) -> Option<&QuotedString>
[src]
Get a reference to the description of the xref, if any.
pub fn description_mut(&mut self) -> Option<&mut QuotedString>
[src]
Get a mutable reference to the description of the xref, if any.
Trait Implementations
impl<'i> FromPair<'i> for Xref
[src]
const RULE: Rule
[src]
unsafe fn from_pair_unchecked(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
Create a new instance from a Pair
.
impl Identified for Xref
[src]
impl Clone for Xref
[src]
fn clone(&self) -> Xref
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Xref
[src]
fn cmp(&self, other: &Xref) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Xref> for Xref
[src]
fn partial_cmp(&self, other: &Xref) -> Option<Ordering>
[src]
fn lt(&self, other: &Xref) -> bool
[src]
fn le(&self, other: &Xref) -> bool
[src]
fn gt(&self, other: &Xref) -> bool
[src]
fn ge(&self, other: &Xref) -> bool
[src]
impl PartialEq<Xref> for Xref
[src]
impl Eq for Xref
[src]
impl Debug for Xref
[src]
impl Display for Xref
[src]
impl Hash for Xref
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromIterator<Xref> for XrefList
[src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Xref>,
[src]
T: IntoIterator<Item = Xref>,
impl FromStr for Xref
[src]
Auto Trait Implementations
impl Unpin for Xref
impl Sync for Xref
impl Send for Xref
impl UnwindSafe for Xref
impl RefUnwindSafe for Xref
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,