pub struct Privacy(/* private fields */);Expand description
One value from the message-wide comma-delimited Privacy list.
Use crate::message::Headers::typed_all to decode and validate the complete list across
comma-joined and repeated rows. PrivacyList is the checked construction counterpart.
Implementations§
Source§impl Privacy
impl Privacy
Sourcepub fn new(value: PrivacyValue) -> Result<Self, HeaderError>
pub fn new(value: PrivacyValue) -> Result<Self, HeaderError>
Construct one syntactically valid privacy-list element.
Sourcepub fn value(&self) -> &PrivacyValue
pub fn value(&self) -> &PrivacyValue
The typed privacy-list element.
Sourcepub fn is(&self, wanted: &PrivacyValue) -> bool
pub fn is(&self, wanted: &PrivacyValue) -> bool
Whether this is the requested value, using case-insensitive token comparison.
Trait Implementations§
Source§impl TypedHeader for Privacy
impl TypedHeader for Privacy
Source§const NAME: HeaderName = HeaderName::Privacy
const NAME: HeaderName = HeaderName::Privacy
The header this type reads.
Source§const VALIDATE_LIST: bool = true
const VALIDATE_LIST: bool = true
Whether
Headers::typed_all must collect and validate the complete field before yielding. Read moreSource§fn decode(value: &[u8]) -> Result<Self, HeaderError>
fn decode(value: &[u8]) -> Result<Self, HeaderError>
Parse one header value. The value arrives unfolded and trimmed.
Source§fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse every value in one header row. Read more
Source§fn validate_list(values: &[&Self]) -> Result<(), HeaderError>
fn validate_list(values: &[&Self]) -> Result<(), HeaderError>
Validate all decoded values of this field across the complete message. Read more
impl Eq for Privacy
impl StructuralPartialEq for Privacy
Auto Trait Implementations§
impl Freeze for Privacy
impl RefUnwindSafe for Privacy
impl Send for Privacy
impl Sync for Privacy
impl Unpin for Privacy
impl UnsafeUnpin for Privacy
impl UnwindSafe for Privacy
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