[][src]Trait fastobo::semantics::OboFrame

pub trait OboFrame {
    type Clause: OboClause;
    fn clauses_ref(&self) -> Vec<&Self::Clause>;

    fn cardinality_check(&self) -> Result<(), CardinalityError> { ... }
}

Common attributes and operations for all frames.

Associated Types

Loading content...

Required methods

fn clauses_ref(&self) -> Vec<&Self::Clause>

Get a vector of references to the clauses of a frame.

Note

While currently returning a Box<Iterator>, this method will be changed to return an associated type when RFC1598 is implemented and available in stable Rust.

Loading content...

Provided methods

fn cardinality_check(&self) -> Result<(), CardinalityError>

Check the frame only contains clauses with the right cardinality.

Note

The current implementation does not check for missing clauses: good ergonomics are to be found to provide a collection of required clauses in a generic manner.

Loading content...

Implementors

impl OboFrame for HeaderFrame[src]

type Clause = HeaderClause

impl OboFrame for InstanceFrame[src]

type Clause = InstanceClause

impl OboFrame for TermFrame[src]

type Clause = TermClause

impl OboFrame for TypedefFrame[src]

type Clause = TypedefClause

Loading content...