[][src]Struct fastobo::ast::Xref

pub struct Xref { /* fields omitted */ }

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]

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]

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]

impl Identified for Xref[src]

impl Eq for Xref[src]

impl Clone for Xref[src]

impl PartialOrd<Xref> for Xref[src]

impl PartialEq<Xref> for Xref[src]

impl Ord for Xref[src]

impl Hash for Xref[src]

impl Debug for Xref[src]

impl Display for Xref[src]

impl FromStr for Xref[src]

type Err = SyntaxError

The associated error which can be returned from parsing.

impl FromIterator<Xref> for XrefList[src]

Auto Trait Implementations

impl Send for Xref

impl Unpin for Xref

impl Sync for Xref

impl UnwindSafe for Xref

impl RefUnwindSafe for Xref

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]