pub struct ASCIIGenerator { /* private fields */ }
Implementations§
Source§impl ASCIIGenerator
impl ASCIIGenerator
Sourcepub fn set_image<P: AsRef<Path>>(&mut self, image: P) -> &mut Self
pub fn set_image<P: AsRef<Path>>(&mut self, image: P) -> &mut Self
Sets the image that is used to generate art.
Sourcepub fn set_color(&mut self, color: bool) -> &mut Self
pub fn set_color(&mut self, color: bool) -> &mut Self
Sets whether or not to generate the art with color.
Sourcepub fn set_dimensions(&mut self, dimensions: (u32, u32)) -> &mut Self
pub fn set_dimensions(&mut self, dimensions: (u32, u32)) -> &mut Self
Sets the dimensions of the generator image. If left at the default, (0, 0), dimensions are set to match the image dimensions.
Sourcepub fn build(&self) -> Result<Vec<Line>, AsciiError>
pub fn build(&self) -> Result<Vec<Line>, AsciiError>
Generates the art into a Vec<String>.
Trait Implementations§
Source§impl Default for ASCIIGenerator
impl Default for ASCIIGenerator
Source§fn default() -> ASCIIGenerator
fn default() -> ASCIIGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ASCIIGenerator
impl RefUnwindSafe for ASCIIGenerator
impl Send for ASCIIGenerator
impl Sync for ASCIIGenerator
impl Unpin for ASCIIGenerator
impl UnwindSafe for ASCIIGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.