[][src]Struct iconwriter::favicon::Favicon

pub struct Favicon { /* fields omitted */ }

A comprehensive favicon builder.

Implementations

impl Favicon[src]

pub fn apple_touch(&mut self, b: bool) -> &mut Self[src]

Indicates that the outputted html-helper should contain link tags for apple-touch icons.

This option defaults to false.

Example

let fav = Favicon::new().apple_touch(true);
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="icons/favicon-0.png">
<link rel="icon" sizes="196x196" href="icons/favicon-0.png">

pub fn web_app(&mut self, b: bool) -> &mut Self[src]

Indicates that the output of self.write or self.save should contain a manifest.webmanifest file to assist on creating PWA icons.

This option defaults to false.

Example

let fav = Favicon::new().web_app(true);
...
<link rel="manifest" href="manifest.webmanifest">
{
    icons: [
        {
            src: "icons/favicon-0.png",
            sizes: "196x196",
            type: "image/png"
        }
    ],
}

pub fn html_helper(&self) -> Result<Vec<u8>>[src]

Returns a buffer containing HTML link tags to assist on the creating of the icon.

pub fn manifest(&self) -> Result<Vec<u8>>[src]

Returns a buffer containing a JSON helper for web manisfests.

Trait Implementations

impl Clone for Favicon[src]

impl Icon for Favicon[src]

type Key = Key

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.