Module fastobo::ast

source ·
Expand description

Owned syntax tree for the OBO format version 1.4.

OboDoc is the struct acting as the root of the syntax tree. It can be created from a borrowed string slice with either FromStr::from_str or FromSlice::from_slice, from a file with fastobo::from_file, or from a buffered reader with fastobo::from_stream.

About FromStr

All types in this module should implement FromStr to allow them to be read from their string serialization. However, some types are simple wrappers for string types (e.g. UnquotedString and QuotedString) and can be constructed from their string value using the From<&str> implementation. Make sure not to confuse how you instantiate these types depending on the content of the string you use.

Structs

  • A unique identifier for a class (i.e. a term).
  • An inline comment without semantic value.
  • An entity textual definition, with optional cross-references supporting it.
  • The header frame, containing metadata about an OBO document.
  • An identifier prefix, either canonical or non-canonical.
  • An instance frame, describing a particular individual.
  • A unique identifier for an instance.
  • A comprehensive ISO-8601 date.
  • A comprehensive ISO-8601 datetime.
  • An ISO-8601 time, with an optional timezone specifier.
  • A line in an OBO file, possibly followed by qualifiers and a comment.
  • A property-value binding where the value is given by a typed literal.
  • A naive datetime, as found in header frames.
  • An OBO namespace identifier.
  • A complete OBO document in format version 1.4.
  • An identifier with a prefix.
  • A qualifier, possibly used as a trailing modifier.
  • A list containing zero or more Qualifiers.
  • A borrowed QuotedString.
  • A string enclosed by quotes, used for definitions.
  • A unique identifier for a typedef (i.e. a relation).
  • A property-value where the triple target is refered to with an ID.
  • A unique identifier for a subset
  • A synonym, denoting an alternative name for the embedding entity.
  • A unique identifier for a synonym type.
  • A term frame, describing a class.
  • A typedef clause, describing a relationship.
  • An identifier without a prefix.
  • A borrowed UnquotedString.
  • A string without delimiters, used as values in different clauses.
  • A Uniform Resource Locator used as an identifier for an entity.
  • A database cross-reference definition.
  • A list of containing zero or more Xrefs.

Enums

  • The creation date of an OBO entity.
  • An entity frame, describing either a term, an instance, or a typedef.
  • Any kind of OBO frame.
  • A clause appearing in a header frame.
  • An identifier, either prefixed, unprefixed, or a valid URL.
  • A reference to another document to be imported.
  • A clause appearing in an instance frame.
  • An ISO-8601 timezone.
  • A clause value binding a property to a value in the relevant entity.
  • A synonym scope specifier.
  • A clause appearing in a term frame.
  • A clause appearing in a typedef frame.

Traits

  • A trait for common attributes of OBO times.
  • A trait for common operations on OBO datetimes.
  • A trait for common attributes of OBO times.

Type Definitions

  • The optional part of a line, holding a qualifier list and a comment.
  • The inner string type used to store identifiers.
  • The inner string type used to store text.