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

pub struct Synonym { /* fields omitted */ }

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

Methods

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<'i> FromPair<'i> for Synonym[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl Ord for Synonym[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialEq<Synonym> for Synonym[src]

impl PartialOrd<Synonym> for Synonym[src]

impl Eq for Synonym[src]

impl Clone for Synonym[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for Synonym[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Synonym[src]

impl Display for Synonym[src]

impl FromStr for Synonym[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Synonym

impl Sync for Synonym

Blanket Implementations

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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