Struct titik::Buffer [−][src]
Contains a vec of cells. Buffer contains the information needed to render into the screen
Implementations
impl Buffer
[src]
pub fn new(width: usize, height: usize) -> Self
[src]
create a buffer with size
pub fn reset(&mut self)
[src]
reset the content of the buffer to empty
pub fn set_symbol<S: ToString>(&mut self, x: usize, y: usize, symbol: S)
[src]
set the character of this location with symbol
pub fn write_str<S: ToString>(&mut self, x: usize, y: usize, s: S)
[src]
enumerate the characters in the string and set the cells horizontally incrementing on the x component
pub fn write_bold_str<S: ToString>(&mut self, x: usize, y: usize, s: S)
[src]
write string as bold
pub fn set_cell(&mut self, x: usize, y: usize, new_cell: Cell)
[src]
set the cell at this location
pub fn diff<'a>(&self, new: &'a Self) -> Vec<(usize, usize, &'a Cell)>
[src]
get the diff of 2 buffers
pub fn render(&self, w: &mut dyn Write) -> Result<()>
[src]
writes to the stdout buffer
Trait Implementations
impl Debug for Buffer
[src]
impl Display for Buffer
[src]
impl PartialEq<Buffer> for Buffer
[src]
impl StructuralPartialEq for Buffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,