pub enum ViewerContent {
InlineHtml {
html: String,
base_dir: Option<PathBuf>,
},
LocalFile {
path: PathBuf,
},
AppDir {
root: PathBuf,
entry: Option<String>,
},
RemoteUrl {
url: Url,
},
}Expand description
The type of content to display in the viewer.
Variants§
InlineHtml
Plain inline HTML string.
Fields
LocalFile
A single local file, usually an HTML file.
AppDir
A directory that contains a static HTML application, such as index.html, JS bundles, CSS, and assets.
Fields
RemoteUrl
A remote URL. Only allowed if enabled in BehaviourOptions.
Trait Implementations§
Source§impl Clone for ViewerContent
impl Clone for ViewerContent
Source§fn clone(&self) -> ViewerContent
fn clone(&self) -> ViewerContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewerContent
impl Debug for ViewerContent
Source§impl<'de> Deserialize<'de> for ViewerContent
impl<'de> Deserialize<'de> for ViewerContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ViewerContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ViewerContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ViewerContent
impl Serialize for ViewerContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ViewerContent
impl RefUnwindSafe for ViewerContent
impl Send for ViewerContent
impl Sync for ViewerContent
impl Unpin for ViewerContent
impl UnsafeUnpin for ViewerContent
impl UnwindSafe for ViewerContent
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