[−][src]Enum imgix::Scheme
Primary value for expressing which scheme a url uses.
This is an enum to define and enforce the crate semantics of what it means for a url to be valid for our use-case. A url can be in one of two states: it either uses https or it uses http. While this can be achieved by toggling https on and off via a boolean value, a boolean value weakens the semantics and constrains the range of possible schemes that can be used in the future.
Using Scheme::Https
is also more explicit than saying url.https(true)
,
it also has the added benefit of being discoverable. When usage is
url.scheme(Scheme::...)
, the range of possible schemes can be discovered
by IDE code completion tools.
Variants
Trait Implementations
impl Debug for Scheme
[src]
impl Display for Scheme
[src]
impl PartialEq<Scheme> for Scheme
[src]
impl StructuralPartialEq for Scheme
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scheme
impl Send for Scheme
impl Sync for Scheme
impl Unpin for Scheme
impl UnwindSafe for Scheme
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,