Expand description
Rust implementation of the SBOL 2.3.0 specification.
sbol2 is the SBOL 2 peer of the sbol3 crate. It
builds on the version-neutral machinery in sbol_core (the field-metadata
descriptors, identity newtypes, RDF-backed document store) and layers on the
SBOL 2 typed data model, its RDF serialization, and a shared field-metadata
catalog. Most users reach it through the umbrella sbol crate as sbol::v2.
Modules§
- constants
- Common ontology IRIs for building SBOL 2 documents.
- identity
- Validated identity helpers used by the typed builder surface.
- prelude
- Convenient re-exports for typical SBOL 2 construction and inspection
workflows.
use sbol2::prelude::*;brings the typed objects, builders, document, identity newtypes, and theSbolIdentified/SbolTopLevelaccessor traits into scope. - schema
- Field-metadata catalog for the SBOL 2 data model.
- validation
- SBOL 2 validation: a rule catalog generated from
rules.toml, the shared reporting and configuration types fromsbol_core, and the engine that evaluates a document against the catalog.
Structs§
- Activity
- Activity
Builder - Builder for
Activity. - Agent
- Agent
Builder - Builder for the corresponding PROV-O TopLevel class.
- Association
- Association
Builder - Builder for
Association. - Attachment
- Attachment
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Binary
Prefix - Binary
Prefix Builder - Builder for the corresponding OM Prefix-hierarchy class.
- Collection
- Collection
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Combinatorial
Derivation - Combinatorial
Derivation Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Component
- Component
Builder - Builder for
Component. - Component
Definition - Component
Definition Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Component
Instance Data - Shared owned fields for the abstract ComponentInstance mixin.
- Compound
Unit - Compound
Unit Builder - Builder for the corresponding OM Unit-hierarchy class.
- Cut
- CutBuilder
- Builder for
Cut. - Diff
- The identity-keyed difference between two SBOL documents.
- Display
Id - A validated SBOL
displayId. - Document
- An SBOL 2 document parsed from RDF.
- Experiment
- Experiment
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Experimental
Data - Experimental
Data Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Extension
Triple - A non-SBOL annotation triple attached to a typed object.
- Functional
Component - Functional
Component Builder - Builder for
FunctionalComponent. - Generic
Location - Generic
Location Builder - Builder for
GenericLocation. - Generic
TopLevel - A
sbol2:GenericTopLevel: a user-extension TopLevel whose custom RDF class is carried in thesbol2:rdfTypeproperty alongside arbitrary extension triples. - Generic
TopLevel Builder - Builder for
GenericTopLevel. - Hash
Algorithm - A validated hash algorithm token for
Attachment.hashAlgorithm. - Identified
- Shared fields on Identified objects.
- Identified
Data - Shared owned fields for SBOL 2 Identified objects.
- Identified
Extension - An RDF subject preserved through the typed model when no concrete SBOL 2
class variant matched its
rdf:typeset. Therdf_typesvector preserves every originalrdf:typeIRI so re-serialization emits exactly what the parser saw. - Identified
Extension Builder - Builder for
IdentifiedExtension. - Implementation
- Implementation
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Interaction
- Interaction
Builder - Builder for
Interaction. - Iri
- An RDF IRI.
- Literal
- RDF literal lexical data.
- Location
Data - Shared owned fields for the abstract Location mixin.
- MapsTo
- Maps
ToBuilder - Builder for
MapsTo. - Measure
- Measure
Builder - Builder for
Measure. - Measured
Data - Shared owned fields for the abstract Measured mixin.
- Model
- Model
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Module
- Module
Builder - Builder for
Module. - Module
Definition - Module
Definition Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Namespace
- A validated SBOL namespace URL.
- Object
- An SBOL or SBOL extension object.
- Object
Diff - The change to a single object present in both documents.
- Participation
- Participation
Builder - Builder for
Participation. - Plan
- Plan
Builder - Builder for the corresponding PROV-O TopLevel class.
- Prefix
- Prefix
Builder - Builder for the corresponding OM Prefix-hierarchy class.
- Prefix
Data - Shared OM Prefix fields, carried by every concrete Prefix subclass.
- Prefixed
Unit - Prefixed
Unit Builder - Builder for the corresponding OM Unit-hierarchy class.
- Property
Change - The change to the values of one predicate on a changed object.
- Range
- Range
Builder - Builder for
Range. - RawDocument
- An RDF graph paired with its parsed, identity-indexed objects.
- RdfGraph
- Backend-opaque in-memory RDF graph.
- SIPrefix
- SIPrefix
Builder - Builder for the corresponding OM Prefix-hierarchy class.
- Sbol
Identity - A namespace + displayId pair that resolves to a compliant SBOL identity URL.
- Sequence
- Sequence
Annotation - Sequence
Annotation Builder - Builder for
SequenceAnnotation. - Sequence
Builder - Builder for the corresponding SBOL 2 TopLevel class.
- Sequence
Constraint - Sequence
Constraint Builder - Builder for
SequenceConstraint. - Sequence
Elements - A sequence’s
elementsliteral paired with itsencodingIRI. - Singular
Unit - Singular
Unit Builder - Builder for the corresponding OM Unit-hierarchy class.
- TopLevel
- Shared fields on TopLevel objects.
- TopLevel
Data - Shared owned fields for SBOL 2 TopLevel objects. SBOL 2 has no
hasNamespace, so only the attachment set lives here. - Triple
- An RDF triple in the default graph.
- Unit
- Unit
Builder - Builder for the corresponding OM Unit-hierarchy class.
- Unit
Data - Shared OM Unit fields, carried by every concrete Unit subclass.
- Unit
Division - Unit
Division Builder - Builder for the corresponding OM Unit-hierarchy class.
- Unit
Exponentiation - Unit
Exponentiation Builder - Builder for the corresponding OM Unit-hierarchy class.
- Unit
Multiplication - Unit
Multiplication Builder - Builder for the corresponding OM Unit-hierarchy class.
- Usage
- Usage
Builder - Builder for
Usage. - Variable
Component - Variable
Component Builder - Builder for
VariableComponent.
Enums§
- Build
Error - Errors produced while building an SBOL document from owned typed objects.
- RdfFormat
- RDF serialization format.
- Read
Error - Errors produced while reading an SBOL document.
- Resource
- RDF subject resource.
- Sbol2
Class - SBOL RDF classes handled by this crate.
- Sbol2
Object - Owned SBOL 2 object variants supported by the client API.
- Term
- RDF object term.
- Write
Error - Errors produced while writing an SBOL document.
Traits§
- Object
Classes - Classifies an
Objectagainst the SBOL 2 class hierarchy. - Object
Store - Read access to a document’s RDF-backed objects, indexed by identity.
- Sbol
Identified - Read-only access to the shared metadata every SBOL 2
Identifiedobject carries:persistentIdentity,version,displayId,name(dcterms:title),description(dcterms:description), the PROVwasDerivedFrom/wasGeneratedByresource sets, and round-tripped non-SBOL extension triples. - Sbol
TopLevel - Read-only access to the metadata SBOL 2
TopLevelobjects carry on top ofSbolIdentified: the attachedsbol:Attachmentresources. - ToRdf
- Converts an owned typed SBOL value into RDF triples.
- TryFrom
Object - Converts an RDF-collected object into an owned typed SBOL value.
Functions§
- render_
sbol2_ conformance_ report - Renders the SBOL 2 conformance report markdown for the supplied rule
catalog. Pass
validation_rule_statuses()to render the canonical committed report.