Skip to main content

HtmlOptions

Struct HtmlOptions 

Source
pub struct HtmlOptions<'a> {
    pub path: Option<&'a str>,
    pub url: Option<&'a str>,
    pub content: Option<&'a str>,
    pub title: Option<&'a str>,
    pub height: Option<Value>,
}
Expand description

Options for an embedded-HTML doc entry (DocEntry::html).

Exactly one of path, url, or content must be Some. Build with HtmlOptions::default and set the fields you need.

Fields§

§path: Option<&'a str>

Local HTML file path (inlined into the report by default).

§url: Option<&'a str>

Remote URL rendered via iframe src.

§content: Option<&'a str>

Inline HTML content rendered via iframe srcdoc.

§title: Option<&'a str>

Title shown in the embed’s chrome bar.

§height: Option<Value>

Iframe height: a JSON number → px, a JSON string passed through (e.g. “60vh”). Default 400px.

Trait Implementations§

Source§

impl<'a> Default for HtmlOptions<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for HtmlOptions<'a>

§

impl<'a> RefUnwindSafe for HtmlOptions<'a>

§

impl<'a> Send for HtmlOptions<'a>

§

impl<'a> Sync for HtmlOptions<'a>

§

impl<'a> Unpin for HtmlOptions<'a>

§

impl<'a> UnsafeUnpin for HtmlOptions<'a>

§

impl<'a> UnwindSafe for HtmlOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.