Struct grin_api::auth::MWC_FOREIGN_BASIC_REALM [−][src]
pub struct MWC_FOREIGN_BASIC_REALM { /* fields omitted */ }
Methods from Deref<Target = HeaderValue>
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");
Returns the length of self
.
This length is in bytes.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.len(), 5);
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());
Converts a HeaderValue
to a byte slice.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.as_bytes(), b"hello");
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
type Target = HeaderValue
type Target = HeaderValue
The resulting type after dereferencing.
Dereferences the value.
Auto Trait Implementations
impl RefUnwindSafe for MWC_FOREIGN_BASIC_REALM
impl Send for MWC_FOREIGN_BASIC_REALM
impl Sync for MWC_FOREIGN_BASIC_REALM
impl Unpin for MWC_FOREIGN_BASIC_REALM
impl UnwindSafe for MWC_FOREIGN_BASIC_REALM
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
pub fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more
type Output = T
type Output = T
Should always be Self