#[non_exhaustive]pub struct Unit {
pub identity: Resource,
pub identified: IdentifiedData,
pub top_level: TopLevelData,
pub unit: UnitData,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.identity: Resource§identified: IdentifiedData§top_level: TopLevelData§unit: UnitDataImplementations§
Source§impl Unit
impl Unit
pub fn builder( namespace: impl TryInto<Namespace, Error = LexError>, display_id: impl TryInto<DisplayId, Error = LexError>, ) -> Result<UnitBuilder, BuildError>
pub fn new( namespace: impl TryInto<Namespace, Error = LexError>, display_id: impl TryInto<DisplayId, Error = LexError>, label: impl Into<String>, symbol: impl Into<String>, ) -> Result<Self, BuildError>
Trait Implementations§
impl Eq for Unit
Source§impl SbolIdentified for Unit
impl SbolIdentified for Unit
Source§fn identified_data(&self) -> &IdentifiedData
fn identified_data(&self) -> &IdentifiedData
Returns the underlying
IdentifiedData this accessor reads from.Source§fn persistent_identity(&self) -> Option<&Resource>
fn persistent_identity(&self) -> Option<&Resource>
The object’s
sbol:persistentIdentity, if present.Source§fn display_id(&self) -> Option<&str>
fn display_id(&self) -> Option<&str>
The object’s
sbol:displayId, if present.Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
The object’s
dcterms:description, if present.Source§fn derived_from(&self) -> &[Resource]
fn derived_from(&self) -> &[Resource]
Resources this object lists as
prov:wasDerivedFrom.Source§fn generated_by(&self) -> &[Resource]
fn generated_by(&self) -> &[Resource]
Resources this object lists as
prov:wasGeneratedBy.Source§fn extensions(&self) -> &[ExtensionTriple]
fn extensions(&self) -> &[ExtensionTriple]
Non-SBOL annotation triples preserved on this object’s identity.
Source§impl SbolTopLevel for Unit
impl SbolTopLevel for Unit
Source§fn top_level_data(&self) -> &TopLevelData
fn top_level_data(&self) -> &TopLevelData
Returns the underlying
TopLevelData this accessor reads from.Source§fn attachments(&self) -> &[Resource]
fn attachments(&self) -> &[Resource]
sbol:Attachment resources attached via sbol:attachment.impl StructuralPartialEq for Unit
Source§impl TryFromObject for Unit
impl TryFromObject for Unit
fn try_from_object(object: &Object) -> Option<Self>
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
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