[][src]Struct fastobo::ast::Synonym

pub struct Synonym { /* fields omitted */ }

A synonym, denoting an alternative name for the embedding entity.

Implementations

impl Synonym[src]

pub fn new<D>(desc: D, scope: SynonymScope) -> Self where
    D: Into<QuotedString>, 
[src]

Create a Synonym with the given description and scope.

pub fn with_type<D, T>(desc: D, scope: SynonymScope, ty: T) -> Self where
    D: Into<QuotedString>,
    T: Into<Option<SynonymTypeIdent>>, 
[src]

Create a Synonym with the given description, scope, and type.

pub fn with_xrefs<D, L>(desc: D, scope: SynonymScope, xrefs: L) -> Self where
    D: Into<QuotedString>,
    L: Into<XrefList>, 
[src]

Create a Synonym with the given description, scope, and xrefs.

pub fn with_type_and_xrefs<D, T, L>(
    desc: D,
    scope: SynonymScope,
    ty: T,
    xrefs: L
) -> Self where
    D: Into<QuotedString>,
    T: Into<Option<SynonymTypeIdent>>,
    L: Into<XrefList>, 
[src]

Create a Synonym with the given description, scope, type, and xrefs.

impl Synonym[src]

pub fn description(&self) -> &QuotedString[src]

Get a reference to the description of the Synonym.

pub fn description_mut(&mut self) -> &mut QuotedString[src]

Get a mutable reference to the description of the Synonym.

pub fn scope(&self) -> &SynonymScope[src]

Get a reference to the scope of the Synonym.

pub fn scope_mut(&mut self) -> &mut SynonymScope[src]

Get a mutable reference to the scope of the Synonym.

pub fn ty(&self) -> Option<&SynonymTypeIdent>[src]

Get a reference to the type of the Synonym, if any.

pub fn ty_mut(&mut self) -> Option<&mut SynonymTypeIdent>[src]

Get a mutable reference to the type of the Synonym, if any.

pub fn xrefs(&self) -> &XrefList[src]

Get a reference to the xrefs of the Synonym.

pub fn xrefs_mut(&mut self) -> &mut XrefList[src]

Get a mutable reference to the xrefs of the Synonym.

Trait Implementations

impl Clone for Synonym[src]

impl Debug for Synonym[src]

impl Display for Synonym[src]

impl Eq for Synonym[src]

impl<'i> FromPair<'i> for Synonym[src]

impl FromStr for Synonym[src]

type Err = SyntaxError

The associated error which can be returned from parsing.

impl Hash for Synonym[src]

impl Ord for Synonym[src]

impl PartialEq<Synonym> for Synonym[src]

impl PartialOrd<Synonym> for Synonym[src]

impl StructuralEq for Synonym[src]

impl StructuralPartialEq for Synonym[src]

Auto Trait Implementations

impl RefUnwindSafe for Synonym

impl Send for Synonym

impl Sync for Synonym

impl Unpin for Synonym

impl UnwindSafe for Synonym

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.