[−][src]Struct glint::figlet::Figlet
Methods
impl Figlet
[src]
pub fn create_vec(&self) -> Vec<String>
[src]
Creates a Vec for holding figlet output with enough vertical space
to contain this font.
You may borrow this as a mutable slice and pass it to Font::write_to_buf
pub fn write_to_buf(&self, s: &str, output: &mut [String]) -> usize
[src]
Writes a single character to the buffer.
The length of output
should be at least font.height()
, however it's safe to
pass a smaller slice (the rendering will be cropped).
The same number of characters will be appended to each string, padding with spaces if needed.
#Example
use glint::Figlet; let figlet = Figlet::default(); let mut output = figlet.create_vec(); figlet.write_to_buf("feat(client)", &mut output[..]);
pub fn write_to_buf_color(
&self,
s: &str,
output: &mut [String],
style: impl FnMut(&str) -> String
) -> usize
[src]
&self,
s: &str,
output: &mut [String],
style: impl FnMut(&str) -> String
) -> usize
pub fn from_file(path: impl AsRef<Path>) -> Result<Self, Error>
[src]
pub fn height(&self) -> usize
[src]
Returns the height of the largest character in the font. This operation is very fast.
Trait Implementations
Auto Trait Implementations
impl Sync for Figlet
impl Unpin for Figlet
impl Send for Figlet
impl UnwindSafe for Figlet
impl RefUnwindSafe for Figlet
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,