pub struct DirectiveValue(pub Vec<u8>);
Expand description
Cache control directive value type
Tuple Fields§
§0: Vec<u8>
Implementations§
Source§impl DirectiveValue
impl DirectiveValue
Sourcepub fn parse_as_bytes(&self) -> &[u8] ⓘ
pub fn parse_as_bytes(&self) -> &[u8] ⓘ
A DirectiveValue without quotes ("
).
Sourcepub fn parse_as_str(&self) -> Result<&str>
pub fn parse_as_str(&self) -> Result<&str>
A DirectiveValue without quotes ("
) as str
.
Sourcepub fn parse_as_delta_seconds(&self) -> Result<u32>
pub fn parse_as_delta_seconds(&self) -> Result<u32>
Parse the DirectiveValue as delta seconds
"
s are ignored. The value is capped to DELTA_SECONDS_OVERFLOW_VALUE.
Trait Implementations§
Source§impl AsRef<[u8]> for DirectiveValue
impl AsRef<[u8]> for DirectiveValue
Auto Trait Implementations§
impl Freeze for DirectiveValue
impl RefUnwindSafe for DirectiveValue
impl Send for DirectiveValue
impl Sync for DirectiveValue
impl Unpin for DirectiveValue
impl UnwindSafe for DirectiveValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)