pub struct Raw<T: AsRef<str>>(pub T);
Expand description
A raw value that is rendered without escaping.
This is the type returned by maud_static!
and rsx_static!
(Raw<&str>
).
This is useful for rendering raw HTML, but should be used with caution
as it can lead to XSS vulnerabilities if used incorrectly. If you are
unsure, render the string itself, as its Renderable
implementation will
escape any dangerous characters.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Source§impl<T: Ord + AsRef<str>> Ord for Raw<T>
impl<T: Ord + AsRef<str>> Ord for Raw<T>
Source§impl<T: PartialOrd + AsRef<str>> PartialOrd for Raw<T>
impl<T: PartialOrd + AsRef<str>> PartialOrd for Raw<T>
Source§impl<T: AsRef<str>> Renderable for Raw<T>
Available on crate feature alloc
only.
impl<T: AsRef<str>> Renderable for Raw<T>
Available on crate feature
alloc
only.impl<T: Copy + AsRef<str>> Copy for Raw<T>
impl<T: Eq + AsRef<str>> Eq for Raw<T>
impl<T: AsRef<str>> StructuralPartialEq for Raw<T>
Auto Trait Implementations§
impl<T> Freeze for Raw<T>where
T: Freeze,
impl<T> RefUnwindSafe for Raw<T>where
T: RefUnwindSafe,
impl<T> Send for Raw<T>where
T: Send,
impl<T> Sync for Raw<T>where
T: Sync,
impl<T> Unpin for Raw<T>where
T: Unpin,
impl<T> UnwindSafe for Raw<T>where
T: UnwindSafe,
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.