[−][src]Struct iconwriter::favicon::Favicon
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
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn add_entry<F: FnMut(&DynamicImage, u32) -> Result<DynamicImage>>(
&mut self,
filter: F,
source: &Image,
key: Self::Key
) -> Result<(), IconError<Self::Key>>
[src]
&mut self,
filter: F,
source: &Image,
key: Self::Key
) -> Result<(), IconError<Self::Key>>
pub fn write<W: Write>(&mut self, w: &mut W) -> Result<()>
[src]
pub fn save<P: AsRef<Path>>(&mut self, base_path: &P) -> Result<()>
[src]
pub fn new() -> Self
[src]
pub fn add_entries<F: FnMut(&DynamicImage, u32) -> Result<DynamicImage>, I: IntoIterator<Item = Self::Key>>(
&mut self,
filter: F,
source: &Image,
keys: I
) -> Result<(), IconError<Self::Key>>
[src]
&mut self,
filter: F,
source: &Image,
keys: I
) -> Result<(), IconError<Self::Key>>
Auto Trait Implementations
impl RefUnwindSafe for Favicon
[src]
impl Send for Favicon
[src]
impl Sync for Favicon
[src]
impl Unpin for Favicon
[src]
impl UnwindSafe for Favicon
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SetParameter for T
pub fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,