Struct horned_owl::model::IRI [−][src]
pub struct IRI(_);
An IRI is an internationalized version of an URI/URL.
Here, we represent it as a simple string. In Horned-OWL IRIs are
created through Build
; this caches the underlying String meaning
that IRIs are light-weight to clone
.
Methods from Deref<Target = String>
pub fn as_str(&self) -> &str
1.7.0[src]
pub fn as_str(&self) -> &str
Extracts a string slice containing the entire string.
Examples
Basic usage:
let s = String::from("foo"); assert_eq!("foo", s.as_str());
pub fn capacity(&self) -> usize
1.0.0[src]
pub fn capacity(&self) -> usize
Returns this String
's capacity, in bytes.
Examples
Basic usage:
let s = String::with_capacity(10); assert!(s.capacity() >= 10);
pub fn as_bytes(&self) -> &[u8]
1.0.0[src]
pub fn as_bytes(&self) -> &[u8]
Returns a byte slice of this String
's contents.
The inverse of this method is from_utf8
.
Examples
Basic usage:
let s = String::from("hello"); assert_eq!(&[104, 101, 108, 108, 111], s.as_bytes());
pub fn len(&self) -> usize
1.0.0[src]
pub fn len(&self) -> usize
Returns the length of this String
, in bytes.
Examples
Basic usage:
let a = String::from("foo"); assert_eq!(a.len(), 3);
pub fn is_empty(&self) -> bool
1.0.0[src]
pub fn is_empty(&self) -> bool
Returns true
if this String
has a length of zero.
Returns false
otherwise.
Examples
Basic usage:
let mut v = String::new(); assert!(v.is_empty()); v.push('a'); assert!(!v.is_empty());
Trait Implementations
impl Clone for IRI
[src]
impl Clone for IRI
fn clone(&self) -> IRI
[src]
fn clone(&self) -> IRI
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for IRI
[src]
impl Debug for IRI
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for IRI
[src]
impl Eq for IRI
impl PartialEq for IRI
[src]
impl PartialEq for IRI
fn eq(&self, other: &IRI) -> bool
[src]
fn eq(&self, other: &IRI) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IRI) -> bool
[src]
fn ne(&self, other: &IRI) -> bool
This method tests for !=
.
impl Hash for IRI
[src]
impl Hash for IRI
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialOrd for IRI
[src]
impl PartialOrd for IRI
fn partial_cmp(&self, other: &IRI) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &IRI) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &IRI) -> bool
[src]
fn lt(&self, other: &IRI) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &IRI) -> bool
[src]
fn le(&self, other: &IRI) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &IRI) -> bool
[src]
fn gt(&self, other: &IRI) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &IRI) -> bool
[src]
fn ge(&self, other: &IRI) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for IRI
[src]
impl Ord for IRI
fn cmp(&self, other: &IRI) -> Ordering
[src]
fn cmp(&self, other: &IRI) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Deref for IRI
[src]
impl Deref for IRI
type Target = String
The resulting type after dereferencing.
fn deref(&self) -> &String
[src]
fn deref(&self) -> &String
Dereferences the value.
impl From<IRI> for String
[src]
impl From<IRI> for String
impl<'a> From<&'a IRI> for String
[src]
impl<'a> From<&'a IRI> for String
impl From<IRI> for Class
[src]
impl From<IRI> for Class
impl<'a> From<&'a IRI> for Class
[src]
impl<'a> From<&'a IRI> for Class
impl From<Class> for IRI
[src]
impl From<Class> for IRI
impl<'a> From<&'a Class> for IRI
[src]
impl<'a> From<&'a Class> for IRI
impl From<IRI> for ObjectProperty
[src]
impl From<IRI> for ObjectProperty
fn from(iri: IRI) -> ObjectProperty
[src]
fn from(iri: IRI) -> ObjectProperty
Performs the conversion.
impl<'a> From<&'a IRI> for ObjectProperty
[src]
impl<'a> From<&'a IRI> for ObjectProperty
fn from(iri: &IRI) -> ObjectProperty
[src]
fn from(iri: &IRI) -> ObjectProperty
Performs the conversion.
impl From<ObjectProperty> for IRI
[src]
impl From<ObjectProperty> for IRI
fn from(n: ObjectProperty) -> IRI
[src]
fn from(n: ObjectProperty) -> IRI
Performs the conversion.
impl<'a> From<&'a ObjectProperty> for IRI
[src]
impl<'a> From<&'a ObjectProperty> for IRI
fn from(n: &ObjectProperty) -> IRI
[src]
fn from(n: &ObjectProperty) -> IRI
Performs the conversion.
impl From<IRI> for AnnotationProperty
[src]
impl From<IRI> for AnnotationProperty
fn from(iri: IRI) -> AnnotationProperty
[src]
fn from(iri: IRI) -> AnnotationProperty
Performs the conversion.
impl<'a> From<&'a IRI> for AnnotationProperty
[src]
impl<'a> From<&'a IRI> for AnnotationProperty
fn from(iri: &IRI) -> AnnotationProperty
[src]
fn from(iri: &IRI) -> AnnotationProperty
Performs the conversion.
impl From<AnnotationProperty> for IRI
[src]
impl From<AnnotationProperty> for IRI
fn from(n: AnnotationProperty) -> IRI
[src]
fn from(n: AnnotationProperty) -> IRI
Performs the conversion.
impl<'a> From<&'a AnnotationProperty> for IRI
[src]
impl<'a> From<&'a AnnotationProperty> for IRI
fn from(n: &AnnotationProperty) -> IRI
[src]
fn from(n: &AnnotationProperty) -> IRI
Performs the conversion.