pub struct Url(_);
Expand description
A Uniform Resource Locator used as an identifier for an entity.
Implementations§
source§impl Url
impl Url
sourcepub fn new<S>(url: S) -> Result<Self, SyntaxError>where
S: Into<IdentType>,
pub fn new<S>(url: S) -> Result<Self, SyntaxError>where S: Into<IdentType>,
Create a new Url
from an IdentType
.
This method checks the URL is a syntactically correct IRI, but does
not attempt any kind of canonicalization. This can affect comparison
of semantically-equivalent URLs in the PartialEq
implementation.
Example
assert!( Url::from_str("http://example.com/resource").is_ok() );
assert!( Url::from_str("not a URL").is_err() );
Trait Implementations§
source§impl From<Url> for ClassIdent
impl From<Url> for ClassIdent
source§impl From<Url> for InstanceIdent
impl From<Url> for InstanceIdent
source§impl From<Url> for NamespaceIdent
impl From<Url> for NamespaceIdent
source§impl From<Url> for RelationIdent
impl From<Url> for RelationIdent
source§impl From<Url> for SubsetIdent
impl From<Url> for SubsetIdent
source§impl From<Url> for SynonymTypeIdent
impl From<Url> for SynonymTypeIdent
source§impl<'i> FromPair<'i> for Url
impl<'i> FromPair<'i> for Url
source§unsafe fn from_pair_unchecked(
pair: Pair<'i, Rule>,
cache: &Cache
) -> Result<Self, SyntaxError>
unsafe fn from_pair_unchecked( pair: Pair<'i, Rule>, cache: &Cache ) -> Result<Self, SyntaxError>
Create a new instance from a
Pair
without checking the rule. Read moresource§impl Ord for Url
impl Ord for Url
source§impl PartialOrd<Url> for Url
impl PartialOrd<Url> for Url
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Url
impl StructuralEq for Url
impl StructuralPartialEq for Url
Auto Trait Implementations§
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnwindSafe for Url
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