Struct stack_test_epic_api::auth::EPIC_BASIC_REALM
source · [−]pub struct EPIC_BASIC_REALM { /* private fields */ }Methods from Deref<Target = HeaderValue>
sourcepub fn to_str(&self) -> Result<&str, ToStrError>
pub fn to_str(&self) -> Result<&str, ToStrError>
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");sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of self.
This length is in bytes.
Examples
let val = HeaderValue::from_static("hello");
assert_eq!(val.len(), 5);sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
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());sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Converts a HeaderValue to a byte slice.
Examples
let val = HeaderValue::from_static("hello");
assert_eq!(val.as_bytes(), b"hello");sourcepub fn is_sensitive(&self) -> bool
pub fn is_sensitive(&self) -> bool
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
sourceimpl Deref for EPIC_BASIC_REALM
impl Deref for EPIC_BASIC_REALM
type Target = HeaderValue
type Target = HeaderValue
The resulting type after dereferencing.
sourcefn deref(&self) -> &HeaderValue
fn deref(&self) -> &HeaderValue
Dereferences the value.
impl LazyStatic for EPIC_BASIC_REALM
Auto Trait Implementations
impl RefUnwindSafe for EPIC_BASIC_REALM
impl Send for EPIC_BASIC_REALM
impl Sync for EPIC_BASIC_REALM
impl Unpin for EPIC_BASIC_REALM
impl UnwindSafe for EPIC_BASIC_REALM
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
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