#[non_exhaustive]pub enum RdfFormat {
Turtle,
RdfXml,
JsonLd,
NTriples,
}Expand description
RDF serialization format.
SBOL 3.1.0 documents may be exchanged in any of four RDF serializations. libSBOLj3 defaults to RDF/XML; pySBOL3 defaults to sorted Turtle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl RdfFormat
impl RdfFormat
Sourcepub fn from_extension(extension: &str) -> Option<RdfFormat>
pub fn from_extension(extension: &str) -> Option<RdfFormat>
Maps a filename extension (without the leading dot) to a format.
Matching is case-insensitive. Ambiguous extensions like .xml
and .json return None; callers should require the
unambiguous spec-listed extensions instead.
Sourcepub fn from_path(path: impl AsRef<Path>) -> Option<RdfFormat>
pub fn from_path(path: impl AsRef<Path>) -> Option<RdfFormat>
Maps a path’s extension to a format. See from_extension.
Sourcepub fn extension(self) -> &'static str
pub fn extension(self) -> &'static str
Canonical filename extension (without the leading dot) for the format.
Sourcepub fn extensions(self) -> &'static [&'static str]
pub fn extensions(self) -> &'static [&'static str]
All filename extensions sbol-rs accepts on read for this format, canonical extension first.
Trait Implementations§
impl Copy for RdfFormat
impl Eq for RdfFormat
Source§impl Ord for RdfFormat
impl Ord for RdfFormat
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RdfFormat
impl PartialOrd for RdfFormat
impl StructuralPartialEq for RdfFormat
Auto Trait Implementations§
impl Freeze for RdfFormat
impl RefUnwindSafe for RdfFormat
impl Send for RdfFormat
impl Sync for RdfFormat
impl Unpin for RdfFormat
impl UnsafeUnpin for RdfFormat
impl UnwindSafe for RdfFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more