Skip to main content

WebAppManifestBuilder

Struct WebAppManifestBuilder 

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

Implementations§

Source§

impl<'a> WebAppManifestBuilder<'a>

Source

pub fn backgroundColor(self, backgroundColor: impl Into<Cow<'a, str>>) -> Self

Source

pub fn description(self, description: impl Into<Cow<'a, str>>) -> Self

The extra description provided by the manifest.

Source

pub fn dir(self, dir: impl Into<Cow<'a, str>>) -> Self

Source

pub fn display(self, display: impl Into<Cow<'a, str>>) -> Self

Source

pub fn displayOverrides(self, displayOverrides: Vec<Cow<'a, str>>) -> Self

The overrided display mode controlled by the user.

Source

pub fn fileHandlers(self, fileHandlers: Vec<FileHandler<'a>>) -> Self

The handlers to open files.

Source

pub fn icons(self, icons: Vec<ImageResource<'a>>) -> Self

Source

pub fn id(self, id: impl Into<Cow<'a, str>>) -> Self

Source

pub fn lang(self, lang: impl Into<Cow<'a, str>>) -> Self

Source

pub fn launchHandler(self, launchHandler: LaunchHandler<'a>) -> Self

TODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md

Source

pub fn name(self, name: impl Into<Cow<'a, str>>) -> Self

Source

pub fn orientation(self, orientation: impl Into<Cow<'a, str>>) -> Self

Source

pub fn preferRelatedApplications(self, preferRelatedApplications: bool) -> Self

Source

pub fn protocolHandlers( self, protocolHandlers: Vec<ProtocolHandler<'a>>, ) -> Self

The handlers to open protocols.

Source

pub fn relatedApplications( self, relatedApplications: Vec<RelatedApplication<'a>>, ) -> Self

Source

pub fn scope(self, scope: impl Into<Cow<'a, str>>) -> Self

Source

pub fn scopeExtensions(self, scopeExtensions: Vec<ScopeExtension<'a>>) -> Self

Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md

Source

pub fn screenshots(self, screenshots: Vec<Screenshot<'a>>) -> Self

The screenshots used by chromium.

Source

pub fn shareTarget(self, shareTarget: ShareTarget<'a>) -> Self

Source

pub fn shortName(self, shortName: impl Into<Cow<'a, str>>) -> Self

Source

pub fn shortcuts(self, shortcuts: Vec<Shortcut<'a>>) -> Self

Source

pub fn startUrl(self, startUrl: impl Into<Cow<'a, str>>) -> Self

Source

pub fn themeColor(self, themeColor: impl Into<Cow<'a, str>>) -> Self

Source

pub fn build(self) -> WebAppManifest<'a>

Trait Implementations§

Source§

impl<'a> Default for WebAppManifestBuilder<'a>

Source§

fn default() -> WebAppManifestBuilder<'a>

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

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.