pub struct Batch { /* private fields */ }
Implementations§
Source§impl Batch
impl Batch
Sourcepub fn cell(&mut self, x: u16, y: u16, cell_data: &Cell)
pub fn cell(&mut self, x: u16, y: u16, cell_data: &Cell)
Updates a single cell at the given position.
Sourcepub fn cell_by_index(&mut self, idx: usize, cell_data: &Cell)
pub fn cell_by_index(&mut self, idx: usize, cell_data: &Cell)
Updates a cell by its buffer index.
Sourcepub fn cells(&mut self, cells_json: JsValue) -> Result<(), JsValue>
pub fn cells(&mut self, cells_json: JsValue) -> Result<(), JsValue>
Updates multiple cells from an array. Each element should be [x, y, cellData].
Sourcepub fn text(
&mut self,
x: u16,
y: u16,
text: &str,
style: &CellStyle,
) -> Result<(), JsValue>
pub fn text( &mut self, x: u16, y: u16, text: &str, style: &CellStyle, ) -> Result<(), JsValue>
Write text to the terminal
Sourcepub fn fill(
&mut self,
x: u16,
y: u16,
width: u16,
height: u16,
cell_data: &Cell,
) -> Result<(), JsValue>
pub fn fill( &mut self, x: u16, y: u16, width: u16, height: u16, cell_data: &Cell, ) -> Result<(), JsValue>
Fill a rectangular region
Trait Implementations§
Source§impl FromWasmAbi for Batch
impl FromWasmAbi for Batch
Source§impl IntoWasmAbi for Batch
impl IntoWasmAbi for Batch
Source§impl LongRefFromWasmAbi for Batch
impl LongRefFromWasmAbi for Batch
Source§impl OptionFromWasmAbi for Batch
impl OptionFromWasmAbi for Batch
Source§impl OptionIntoWasmAbi for Batch
impl OptionIntoWasmAbi for Batch
Source§impl RefFromWasmAbi for Batch
impl RefFromWasmAbi for Batch
Source§impl RefMutFromWasmAbi for Batch
impl RefMutFromWasmAbi for Batch
Source§impl TryFromJsValue for Batch
impl TryFromJsValue for Batch
Source§impl VectorFromWasmAbi for Batch
impl VectorFromWasmAbi for Batch
Source§impl VectorIntoWasmAbi for Batch
impl VectorIntoWasmAbi for Batch
impl SupportsConstructor for Batch
impl SupportsInstanceProperty for Batch
impl SupportsStaticProperty for Batch
Auto Trait Implementations§
impl Freeze for Batch
impl !RefUnwindSafe for Batch
impl !Send for Batch
impl !Sync for Batch
impl Unpin for Batch
impl !UnwindSafe for Batch
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.