pub struct Simple(/* private fields */);Expand description
Simple term definition: the string a term maps to.
Kept unvalidated: the string may be an IRI, a compact IRI, a blank node identifier or another term, and which one it is can only be told once the context is processed.
Implementations§
Source§impl Simple
impl Simple
Sourcepub fn as_iri(&self) -> Option<Iri<&str>>
pub fn as_iri(&self) -> Option<Iri<&str>>
Parses this definition as an IRI, returning None if it is not one.
Sourcepub fn as_compact_iri(&self) -> Option<&CompactIri>
pub fn as_compact_iri(&self) -> Option<&CompactIri>
Parses this definition as a compact IRI, returning None if it is not
one.
Sourcepub fn as_blank_id(&self) -> Option<&BlankId>
pub fn as_blank_id(&self) -> Option<&BlankId>
Parses this definition as a blank node identifier, returning None if
it is not one.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Unwraps the underlying string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Simple
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Simple
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Simple
Source§impl From<BlankIdBuf> for Simple
impl From<BlankIdBuf> for Simple
Source§fn from(value: BlankIdBuf) -> Self
fn from(value: BlankIdBuf) -> Self
Converts to this type from the input type.
Source§impl From<CompactIriBuf> for Simple
impl From<CompactIriBuf> for Simple
Source§fn from(value: CompactIriBuf) -> Self
fn from(value: CompactIriBuf) -> Self
Converts to this type from the input type.
Source§impl PrecomputeSize for Simple
impl PrecomputeSize for Simple
Source§impl Print for Simple
impl Print for Simple
Source§fn fmt_with(
&self,
f: &mut Formatter<'_>,
_options: &Options,
_indent: usize,
) -> Result
fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize, ) -> Result
Writes the value to
f with the given options, starting at the given
indentation level. Read moreSource§fn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with
Options::pretty options.Source§fn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Print the value with
Options::compact options.Source§fn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Print the value with
Options::inline options.Source§fn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, Self>
Print the value with the given options.
impl StructuralPartialEq for Simple
Auto Trait Implementations§
impl Freeze for Simple
impl RefUnwindSafe for Simple
impl Send for Simple
impl Sync for Simple
impl Unpin for Simple
impl UnsafeUnpin for Simple
impl UnwindSafe for Simple
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if
self is equivalent to key.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.