pub struct ContentTypeWhitelist { /* private fields */ }Expand description
Content-type whitelist for allowed serialization formats
Implementations§
Source§impl ContentTypeWhitelist
impl ContentTypeWhitelist
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Create a permissive whitelist (allows all except blocked)
Sourcepub fn is_allowed(&self, content_type: &str) -> bool
pub fn is_allowed(&self, content_type: &str) -> bool
Check if a content type is allowed
Sourcepub fn allowed_types(&self) -> Vec<&str>
pub fn allowed_types(&self) -> Vec<&str>
Get all allowed content types
Sourcepub fn blocked_types(&self) -> Vec<&str>
pub fn blocked_types(&self) -> Vec<&str>
Get all blocked content types
Trait Implementations§
Source§impl Clone for ContentTypeWhitelist
impl Clone for ContentTypeWhitelist
Source§fn clone(&self) -> ContentTypeWhitelist
fn clone(&self) -> ContentTypeWhitelist
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentTypeWhitelist
impl Debug for ContentTypeWhitelist
Auto Trait Implementations§
impl Freeze for ContentTypeWhitelist
impl RefUnwindSafe for ContentTypeWhitelist
impl Send for ContentTypeWhitelist
impl Sync for ContentTypeWhitelist
impl Unpin for ContentTypeWhitelist
impl UnwindSafe for ContentTypeWhitelist
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