pub struct RawHtml { /* private fields */ }Expand description
A raw HTML string that the renderer must insert without escaping.
Constructed via RawHtml::new (from Lombok New) or,
preferably, the unsafe_no_inline! macro which makes
the security warning loud at the call site.
The content field is pub(crate) with a public
getter (get_content), a crate-internal mut-getter,
and a crate-internal setter. The public getter lets
the renderer read the unescaped content; the
setter / mut-getter are kept crate-internal so the
content is set at construction (preferably through
unsafe_no_inline!) and not mutated after.
Implementations§
Trait Implementations§
impl Eq for RawHtml
impl StructuralPartialEq for RawHtml
Auto Trait Implementations§
impl Freeze for RawHtml
impl RefUnwindSafe for RawHtml
impl Send for RawHtml
impl Sync for RawHtml
impl Unpin for RawHtml
impl UnsafeUnpin for RawHtml
impl UnwindSafe for RawHtml
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