pub struct Raw<T: AsRef<str>>(pub T);Available on crate feature
alloc only.Expand description
A raw value that is rendered without escaping.
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 actual string instead, as its implementation will escape any special characters.
Tuple Fields§
§0: TTrait Implementations§
impl<T: Copy + AsRef<str>> Copy for Raw<T>
Auto Trait Implementations§
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