Skip to main content

Webpage

Struct Webpage 

Source
pub struct Webpage<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Webpage<'a>

Source

pub fn new() -> Self

Source

pub fn file<S, D>(&mut self, name: &'a S, data: &'a D) -> &mut Self
where S: AsRef<str> + ?Sized + 'a, D: AsRef<[u8]> + ?Sized + 'a,

Add a single file to the context of the webpage

Source

pub fn files<Str, Data, Arr>(&mut self, files: &'a Arr) -> &mut Self
where Str: AsRef<str> + Sized + 'a, Data: AsRef<[u8]> + Sized + 'a, Arr: AsRef<[(Str, Data)]> + ?Sized + 'a,

Source

pub fn with_dir<P>(&mut self, dir_path: &'a P) -> &mut Self
where P: AsRef<Path> + ?Sized + 'a,

Source

pub fn background(&mut self, bg: OfflineBackgroundKind) -> &mut Self

Source

pub fn boot_display(&mut self, boot: OfflineBootDisplayKind) -> &mut Self

Source

pub fn javascript(&mut self, js: bool) -> &mut Self

Source

pub fn footer(&mut self, footer: bool) -> &mut Self

Source

pub fn pointer(&mut self, pointer: bool) -> &mut Self

Source

pub fn boot_icon(&mut self, boot_icon: bool) -> &mut Self

Source

pub fn web_audio(&mut self, audio: bool) -> &mut Self

Source

pub fn start_page<S>(&mut self, path: &'a S) -> &mut Self
where S: AsRef<str> + ?Sized + 'a,

Source

pub fn htdocs_dir<S>(&mut self, path: &'a S) -> &mut Self
where S: AsRef<str> + ?Sized + 'a,

Source

pub fn open_session( &mut self, boot_mode: Visibility, ) -> Result<WebSession, OsError>

Source

pub fn open(&mut self) -> Result<PageResult, OsError>

Trait Implementations§

Source§

impl<'a> Default for Webpage<'a>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a> Forget for Webpage<'a>

§

impl<'a> Freeze for Webpage<'a>

§

impl<'a> RefUnwindSafe for Webpage<'a>

§

impl<'a> Send for Webpage<'a>

§

impl<'a> Sync for Webpage<'a>

§

impl<'a> Unpin for Webpage<'a>

§

impl<'a> UnsafeUnpin for Webpage<'a>

§

impl<'a> UnwindSafe for Webpage<'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.