#[non_exhaustive]pub struct ViolatingResource {
pub content_type: String,
pub resource_url: String,
/* private fields */
}Expand description
Information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.content_type: StringThe MIME type of this resource.
resource_url: StringURL of this violating resource.
Implementations§
Source§impl ViolatingResource
impl ViolatingResource
pub fn new() -> Self
Sourcepub fn set_content_type<T: Into<String>>(self, v: T) -> Self
pub fn set_content_type<T: Into<String>>(self, v: T) -> Self
Sets the value of content_type.
§Example
ⓘ
let x = ViolatingResource::new().set_content_type("example");Sourcepub fn set_resource_url<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_url<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_url.
§Example
ⓘ
let x = ViolatingResource::new().set_resource_url("example");Trait Implementations§
Source§impl Clone for ViolatingResource
impl Clone for ViolatingResource
Source§fn clone(&self) -> ViolatingResource
fn clone(&self) -> ViolatingResource
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 ViolatingResource
impl Debug for ViolatingResource
Source§impl Default for ViolatingResource
impl Default for ViolatingResource
Source§fn default() -> ViolatingResource
fn default() -> ViolatingResource
Returns the “default value” for a type. Read more
Source§impl Message for ViolatingResource
impl Message for ViolatingResource
Source§impl PartialEq for ViolatingResource
impl PartialEq for ViolatingResource
impl StructuralPartialEq for ViolatingResource
Auto Trait Implementations§
impl Freeze for ViolatingResource
impl RefUnwindSafe for ViolatingResource
impl Send for ViolatingResource
impl Sync for ViolatingResource
impl Unpin for ViolatingResource
impl UnwindSafe for ViolatingResource
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