Enum adblock::resources::ResourceType
source · pub enum ResourceType {
Mime(MimeType),
Template,
}
Expand description
Different ways that the data within the content
field of a Resource
can be interpreted.
Variants§
Mime(MimeType)
Interpret the data according to the MIME type represented by type
Template
Interpret the data as a Javascript scriptlet template, with embedded template
parameters in the form of {{1}}
, {{2}}
, etc. Note that Mime(ApplicationJavascript)
can still be used as a templated resource, for compatibility purposes.
Implementations§
source§impl ResourceType
impl ResourceType
sourcepub fn supports_redirect(&self) -> bool
pub fn supports_redirect(&self) -> bool
Can resources of this type be used as network redirects?
sourcepub fn supports_scriptlet_injection(&self) -> bool
pub fn supports_scriptlet_injection(&self) -> bool
Can resources of this type be used for scriptlet injections?
Trait Implementations§
source§impl Clone for ResourceType
impl Clone for ResourceType
source§fn clone(&self) -> ResourceType
fn clone(&self) -> ResourceType
Returns a copy 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 ResourceType
impl Debug for ResourceType
source§impl<'de> Deserialize<'de> for ResourceType
impl<'de> Deserialize<'de> for ResourceType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ResourceType
impl PartialEq for ResourceType
source§impl Serialize for ResourceType
impl Serialize for ResourceType
impl StructuralPartialEq for ResourceType
Auto Trait Implementations§
impl Freeze for ResourceType
impl RefUnwindSafe for ResourceType
impl Send for ResourceType
impl Sync for ResourceType
impl Unpin for ResourceType
impl UnwindSafe for ResourceType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)