Struct rdftk_iri::Fragment[][src]

pub struct Fragment(_);

The fragment component of an IRI contains a fragment identifier providing direction to a secondary resource, such as a section heading in an article identified by the remainder of the URI. When the primary resource is an HTML document, the fragment is often an id attribute of a specific element, and web browsers will scroll this element into view.

Example

use rdftk_iri::Fragment;
use std::str::FromStr;

let heading = Fragment::from_str("heading-one").unwrap();
println!("'{}'", heading); // prints '#heading-one'

Implementations

impl Fragment[src]

pub fn is_empty(&self) -> bool[src]

Return true if the fragment is the empty string "" (which is a legal value), else false.

pub fn value(&self) -> &String[src]

Return the current value of this fragment as a String.

Trait Implementations

impl Clone for Fragment[src]

impl Debug for Fragment[src]

impl Default for Fragment[src]

impl Display for Fragment[src]

impl Eq for Fragment[src]

impl FromStr for Fragment[src]

type Err = IriError

The associated error which can be returned from parsing.

impl Hash for Fragment[src]

impl Normalize for Fragment[src]

impl PartialEq<Fragment> for Fragment[src]

impl StructuralEq for Fragment[src]

impl StructuralPartialEq for Fragment[src]

impl ValidateStr for Fragment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.