[][src]Struct grin_api::auth::GRIN_FOREIGN_BASIC_REALM

pub struct GRIN_FOREIGN_BASIC_REALM { /* fields omitted */ }

Methods from Deref<Target = HeaderValue>

pub fn to_str(&self) -> Result<&str, ToStrError>[src]

Yields a &str slice if the HeaderValue only contains visible ASCII chars.

This function will perform a scan of the header value, checking all the characters.

Examples

let val = HeaderValue::from_static("hello");
assert_eq!(val.to_str().unwrap(), "hello");

pub fn len(&self) -> usize[src]

Returns the length of self.

This length is in bytes.

Examples

let val = HeaderValue::from_static("hello");
assert_eq!(val.len(), 5);

pub fn is_empty(&self) -> bool[src]

Returns true if the HeaderValue has a length of zero bytes.

Examples

let val = HeaderValue::from_static("");
assert!(val.is_empty());

let val = HeaderValue::from_static("hello");
assert!(!val.is_empty());

pub fn as_bytes(&self) -> &[u8][src]

Converts a HeaderValue to a byte slice.

Examples

let val = HeaderValue::from_static("hello");
assert_eq!(val.as_bytes(), b"hello");

pub fn is_sensitive(&self) -> bool[src]

Returns true if the value represents sensitive data.

Sensitive data could represent passwords or other data that should not be stored on disk or in memory. By marking header values as sensitive, components using this crate can be instructed to treat them with special care for security reasons. For example, caches can avoid storing sensitive values, and HPACK encoders used by HTTP/2.0 implementations can choose not to compress them.

Additionally, sensitive values will be masked by the Debug implementation of HeaderValue.

Note that sensitivity is not factored into equality or ordering.

Examples

let mut val = HeaderValue::from_static("my secret");

val.set_sensitive(true);
assert!(val.is_sensitive());

val.set_sensitive(false);
assert!(!val.is_sensitive());

Trait Implementations

impl Deref for GRIN_FOREIGN_BASIC_REALM[src]

type Target = HeaderValue

The resulting type after dereferencing.

impl LazyStatic for GRIN_FOREIGN_BASIC_REALM[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

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