[]Struct grin_api::auth::GRIN_BASIC_REALM

pub struct GRIN_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. This setting can be used by components like caches to avoid storing the value. HPACK encoders must set the header field to never index when is_sensitive returns true.

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_BASIC_REALM

type Target = HeaderValue

The resulting type after dereferencing.

impl LazyStatic for GRIN_BASIC_REALM

Auto Trait Implementations

Blanket Implementations

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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

impl<T> UnsafeAny for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

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