Struct pingora_cache::cache_control::DirectiveValue
source · 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 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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)