pub struct NS_API { /* private fields */ }Methods from Deref<Target = StaticIRI>§
Sourcepub fn to_owned(&self) -> Uri<String>
pub fn to_owned(&self) -> Uri<String>
Creates a new Uri<String> by cloning the contents of this Uri<&str>.
Returns the authority component.
Sourcepub fn is_relative(&self) -> bool
pub fn is_relative(&self) -> bool
Returns true if the URI reference is relative, i.e., without a scheme.
Note that this method is not the opposite of is_absolute.
§Examples
use fluent_uri::Uri;
let uri = Uri::parse("/path/to/file")?;
assert!(uri.is_relative());
let uri = Uri::parse("http://example.com/")?;
assert!(!uri.is_relative());Sourcepub fn is_absolute(&self) -> bool
pub fn is_absolute(&self) -> bool
Returns true if the URI reference is absolute, i.e., with a scheme and without a fragment.
Note that this method is not the opposite of is_relative.
§Examples
use fluent_uri::Uri;
let uri = Uri::parse("http://example.com/")?;
assert!(uri.is_absolute());
let uri = Uri::parse("http://example.com/#title1")?;
assert!(!uri.is_absolute());
let uri = Uri::parse("/path/to/file")?;
assert!(!uri.is_absolute());Trait Implementations§
Auto Trait Implementations§
impl Freeze for NS_API
impl RefUnwindSafe for NS_API
impl Send for NS_API
impl Sync for NS_API
impl Unpin for NS_API
impl UnwindSafe for NS_API
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