[−][src]Enum rocket_cors::headers::Origin
The Origin
request header used in CORS
You can use this as a rocket Request Guard
to ensure that Origin
is passed in correctly.
Reference: Mozilla
Variants
A null
Origin
Parsed(Origin)
A well-formed origin that was parsed by url::Url::origin
Opaque(String)
An unknown "opaque" origin that could not be parsed
Methods
impl Origin
[src]
pub fn ascii_serialization(&self) -> String
[src]
Perform an ASCII serialization of this origin.
pub fn is_tuple(&self) -> bool
[src]
Returns whether the origin was parsed as non-opaque
Trait Implementations
impl Clone for Origin
[src]
impl Eq for Origin
[src]
impl PartialEq<Origin> for Origin
[src]
impl Display for Origin
[src]
impl Debug for Origin
[src]
impl FromStr for Origin
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(input: &str) -> Result<Self, Self::Err>
[src]
impl Hash for Origin
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl StructuralPartialEq for Origin
[src]
impl StructuralEq for Origin
[src]
impl<'a, 'r> FromRequest<'a, 'r> for Origin
[src]
Auto Trait Implementations
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnwindSafe for Origin
impl RefUnwindSafe for Origin
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,