pub struct Html { /* private fields */ }Expand description
A server-rendered HTML fragment.
Shelly v0 treats HTML as an opaque fragment. Later milestones can replace this with a typed template representation that separates static and dynamic segments for diffing.
Implementations§
Source§impl Html
impl Html
Sourcepub fn new(value: impl Into<String>) -> Self
pub fn new(value: impl Into<String>) -> Self
Construct an HTML fragment from a string-like value.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the fragment and return the underlying string.
Sourcepub fn template(&self) -> Option<&TemplateSnapshot>
pub fn template(&self) -> Option<&TemplateSnapshot>
Borrow template metadata when this HTML came from Template.
Trait Implementations§
impl Eq for Html
impl StructuralPartialEq for Html
Auto Trait Implementations§
impl Freeze for Html
impl RefUnwindSafe for Html
impl Send for Html
impl Sync for Html
impl Unpin for Html
impl UnsafeUnpin for Html
impl UnwindSafe for Html
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