Skip to main content

Crate sbol

Crate sbol 

Source
Expand description

Umbrella facade for the sbol-rs ecosystem.

This crate re-exports the SBOL 2 implementation as v2, the SBOL 3 implementation as v3, and the SBOL 2 ⇄ SBOL 3 conversion API as convert. It also adds version detection plus a version-neutral AnyDocument handle over the underlying RDF layer.

Re-exports§

pub use sbol_core;
pub use sbol_rdf;
pub use sbol_convert as convert;
pub use sbol2 as v2;
pub use sbol3 as v3;

Modules§

prelude
Re-exports for most sbol-rs code: the SBOL 3 prelude plus the umbrella version-detection surface.

Structs§

Iri
An RDF IRI.
Literal
RDF literal lexical data.
RdfGraph
Backend-opaque in-memory RDF graph.
Triple
An RDF triple in the default graph.

Enums§

AnyDocument
A version-neutral handle over a parsed SBOL document. It wraps an SBOL 3 Document; SBOL 2 documents are handled directly through v2::Document. The enum is #[non_exhaustive] so further arms can be added without a breaking change.
RdfFormat
RDF serialization format.
Resource
RDF subject resource.
SbolVersion
The SBOL major version a document is expressed in.
Term
RDF object term.

Functions§

detect_version
Parses an in-memory RDF serialization and detects its SBOL major version. Returns None when the input does not parse or carries no SBOL namespace.
detect_version_in_graph
Detects the SBOL major version of an already-parsed RDF graph. SBOL 3 evidence takes precedence over SBOL 2 evidence; returns None when the graph carries neither namespace.