pub struct ContentMimeType { /* private fields */ }Expand description
Represents a mime type for some content that is yet to be emitted.
Implementations§
Source§impl ContentMimeType
impl ContentMimeType
Sourcepub fn text<S: AsRef<str>>(self, text: S)
pub fn text<S: AsRef<str>>(self, text: S)
Emits the supplied content, which should be of the mime type already specified. If the type is a binary format (e.g. image/png), the content should have already been base64 encoded.
evcxr_runtime::mime_type("text/html")
.text("<span style=\"color: red\">>Hello world</span>");Auto Trait Implementations§
impl Freeze for ContentMimeType
impl RefUnwindSafe for ContentMimeType
impl Send for ContentMimeType
impl Sync for ContentMimeType
impl Unpin for ContentMimeType
impl UnwindSafe for ContentMimeType
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