Struct servo_url::ServoUrl

source ·
pub struct ServoUrl(pub(crate) Arc<Url>);

Tuple Fields§

§0: Arc<Url>

Implementations§

source§

impl ServoUrl

source

pub fn from_url(url: Url) -> Self

source

pub fn parse_with_base( base: Option<&Self>, input: &str, ) -> Result<Self, ParseError>

source

pub fn into_string(self) -> String

source

pub fn into_url(self) -> Url

source

pub fn get_arc(&self) -> Arc<Url>

source

pub fn as_url(&self) -> &Url

source

pub fn parse(input: &str) -> Result<Self, ParseError>

source

pub fn cannot_be_a_base(&self) -> bool

source

pub fn domain(&self) -> Option<&str>

source

pub fn fragment(&self) -> Option<&str>

source

pub fn path(&self) -> &str

source

pub fn origin(&self) -> ImmutableOrigin

source

pub fn scheme(&self) -> &str

source

pub fn is_secure_scheme(&self) -> bool

source

pub fn is_local_scheme(&self) -> bool

source

pub fn as_str(&self) -> &str

source

pub fn as_mut_url(&mut self) -> &mut Url

source

pub fn set_username(&mut self, user: &str) -> Result<(), UrlError>

source

pub fn set_ip_host(&mut self, addr: IpAddr) -> Result<(), UrlError>

source

pub fn set_password(&mut self, pass: Option<&str>) -> Result<(), UrlError>

source

pub fn set_fragment(&mut self, fragment: Option<&str>)

source

pub fn username(&self) -> &str

source

pub fn password(&self) -> Option<&str>

source

pub fn to_file_path(&self) -> Result<PathBuf, UrlError>

source

pub fn host(&self) -> Option<Host<&str>>

source

pub fn host_str(&self) -> Option<&str>

source

pub fn port(&self) -> Option<u16>

source

pub fn port_or_known_default(&self) -> Option<u16>

source

pub fn join(&self, input: &str) -> Result<ServoUrl, ParseError>

source

pub fn path_segments(&self) -> Option<Split<'_, char>>

source

pub fn query(&self) -> Option<&str>

source

pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Self, UrlError>

source

pub fn debug_compact(&self) -> impl Display + '_

Return a non-standard shortened form of the URL. Mainly intended to be used for debug printing in a constrained space (e.g., thread names).

source

pub fn is_potentially_trustworthy(&self) -> bool

source

pub fn is_origin_trustworthy(&self) -> bool

Trait Implementations§

source§

impl Clone for ServoUrl

source§

fn clone(&self) -> ServoUrl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ServoUrl

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ServoUrl

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for ServoUrl

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Arc<Url>> for ServoUrl

source§

fn from(url: Arc<Url>) -> Self

Converts to this type from the input type.
source§

impl From<Url> for ServoUrl

source§

fn from(url: Url) -> Self

Converts to this type from the input type.
source§

impl Hash for ServoUrl

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Index<Range<Position>> for ServoUrl

§

type Output = str

The returned type after indexing.
source§

fn index(&self, range: Range<Position>) -> &str

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFrom<Position>> for ServoUrl

§

type Output = str

The returned type after indexing.
source§

fn index(&self, range: RangeFrom<Position>) -> &str

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFull> for ServoUrl

§

type Output = str

The returned type after indexing.
source§

fn index(&self, _: RangeFull) -> &str

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeTo<Position>> for ServoUrl

§

type Output = str

The returned type after indexing.
source§

fn index(&self, range: RangeTo<Position>) -> &str

Performs the indexing (container[index]) operation. Read more
source§

impl MallocSizeOf for ServoUrl

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl Ord for ServoUrl

source§

fn cmp(&self, other: &ServoUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ServoUrl

source§

fn eq(&self, other: &ServoUrl) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ServoUrl

source§

fn partial_cmp(&self, other: &ServoUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for ServoUrl

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl ToShmem for ServoUrl

source§

fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> Result<Self>

Clones this value into a form suitable for writing into a SharedMemoryBuilder. Read more
source§

impl Eq for ServoUrl

source§

impl StructuralPartialEq for ServoUrl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T