[−][src]Struct identicon_rs::Identicon
Generic Identicon struct
This is the base struct to be used.
Implementations
impl Identicon
[src]
pub fn new(
input_value: &str,
symmetry: Symmetry,
border: u32,
size: u32,
scale: u32,
background_color: (u8, u8, u8)
) -> Identicon
[src]
input_value: &str,
symmetry: Symmetry,
border: u32,
size: u32,
scale: u32,
background_color: (u8, u8, u8)
) -> Identicon
Generates a new identicon with all given parameters
pub fn new_default(input_value: &str) -> Identicon
[src]
Generates a new identicon with base library defaults
The defaults are:
- symmetry: Symmetry::None
- border: 50
- size: 5
- scale: 500
- background_color: (240, 240, 240)
pub fn new_no_border(input_value: &str) -> Identicon
[src]
Generates a new identicon with the defaults with no border
The defaults are:
- symmetry: Symmetry::None
- border: 0
- size: 5
- scale: 500
- background_color: (240, 240, 240)
pub fn generate_image(&self) -> DynamicImage
[src]
Generates the DynamicImage representing the Identicon
pub fn save_image(&self, output_filename: &str)
[src]
Saves the generated image to the given filename
The file formats .png
, .jpg
, .jpeg
, .bmp
, and .ico
work.
pub fn export_file_data(&self) -> Vec<u8>
[src]
Export the file buffer as a Vec
This is for creating a file for a buffer or network response without creating a file on the filesystem.
Auto Trait Implementations
impl RefUnwindSafe for Identicon
impl Send for Identicon
impl Sync for Identicon
impl Unpin for Identicon
impl UnwindSafe for Identicon
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
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,
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> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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.
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>,