pub enum PageContent {
Url(String, Option<PageContext>),
Text(String),
Image(ImageRefPriv),
Zip(String, String),
}Expand description
The content of a page.
Variants§
Url(String, Option<PageContext>)
A url to an image, with associated context.
The context is sent to the page processor and/or image request modifier if the source implements either.
Text(String)
A markdown text string.
Image(ImageRefPriv)
A raw image.
Zip(String, String)
A url to zip archive and a file path to an image inside the archive.
Implementations§
Source§impl PageContent
impl PageContent
Sourcepub fn url_context<T: Into<String>>(url: T, context: PageContext) -> Self
pub fn url_context<T: Into<String>>(url: T, context: PageContext) -> Self
Create a new PageContent with a url and context.
Trait Implementations§
Source§impl Debug for PageContent
impl Debug for PageContent
Source§impl<'de> Deserialize<'de> for PageContent
impl<'de> Deserialize<'de> for PageContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PageContent
impl PartialEq for PageContent
Source§impl Serialize for PageContent
impl Serialize for PageContent
impl StructuralPartialEq for PageContent
Auto Trait Implementations§
impl Freeze for PageContent
impl RefUnwindSafe for PageContent
impl Send for PageContent
impl Sync for PageContent
impl Unpin for PageContent
impl UnwindSafe for PageContent
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