pub struct OboIdentifier(pub Option<Box<str>>, pub Box<str>);Expand description
A (usually) unique identifier for an entry in an ontology
Tuple Fields§
§0: Option<Box<str>>§1: Box<str>Implementations§
Source§impl OboIdentifier
impl OboIdentifier
Sourcepub const fn new(namespace: Option<Box<str>>, identifier: Box<str>) -> Self
pub const fn new(namespace: Option<Box<str>>, identifier: Box<str>) -> Self
Create a new [OboIdent]
Sourcepub const fn has_namespace(&self) -> bool
pub const fn has_namespace(&self) -> bool
Whether the identifier is has a namespace or not
Sourcepub fn namespace(&self) -> Option<&str>
pub fn namespace(&self) -> Option<&str>
The namespace identifier for this instance. If not present, the identifier is generally localized.
Sourcepub fn identifier(&self) -> &str
pub fn identifier(&self) -> &str
The identifying marker
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for OboIdentifier
impl<'__de, __Context> BorrowDecode<'__de, __Context> for OboIdentifier
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for OboIdentifier
impl Clone for OboIdentifier
Source§fn clone(&self) -> OboIdentifier
fn clone(&self) -> OboIdentifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OboIdentifier
impl Debug for OboIdentifier
Source§impl<__Context> Decode<__Context> for OboIdentifier
impl<__Context> Decode<__Context> for OboIdentifier
Source§impl Default for OboIdentifier
impl Default for OboIdentifier
Source§fn default() -> OboIdentifier
fn default() -> OboIdentifier
Returns the “default value” for a type. Read more
Source§impl Display for OboIdentifier
impl Display for OboIdentifier
Source§impl Encode for OboIdentifier
impl Encode for OboIdentifier
Source§impl From<&str> for OboIdentifier
impl From<&str> for OboIdentifier
Source§impl From<Curie> for OboIdentifier
impl From<Curie> for OboIdentifier
Source§impl From<OboIdentifier> for (Option<Box<str>>, Box<str>)
impl From<OboIdentifier> for (Option<Box<str>>, Box<str>)
Source§fn from(value: OboIdentifier) -> Self
fn from(value: OboIdentifier) -> Self
Converts to this type from the input type.
Source§impl FromStr for OboIdentifier
impl FromStr for OboIdentifier
Source§impl Hash for OboIdentifier
impl Hash for OboIdentifier
Source§impl Ord for OboIdentifier
impl Ord for OboIdentifier
Source§fn cmp(&self, other: &OboIdentifier) -> Ordering
fn cmp(&self, other: &OboIdentifier) -> Ordering
1.21.0 · 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
Source§impl PartialEq<(Option<Box<str>>, Box<str>)> for OboIdentifier
impl PartialEq<(Option<Box<str>>, Box<str>)> for OboIdentifier
Source§impl PartialEq for OboIdentifier
impl PartialEq for OboIdentifier
Source§impl PartialOrd for OboIdentifier
impl PartialOrd for OboIdentifier
Source§impl TryFrom<OboIdentifier> for Curie
impl TryFrom<OboIdentifier> for Curie
Source§type Error = CURIEParsingError
type Error = CURIEParsingError
The type returned in the event of a conversion error.
impl Eq for OboIdentifier
impl StructuralPartialEq for OboIdentifier
Auto Trait Implementations§
impl Freeze for OboIdentifier
impl RefUnwindSafe for OboIdentifier
impl Send for OboIdentifier
impl Sync for OboIdentifier
impl Unpin for OboIdentifier
impl UnwindSafe for OboIdentifier
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