pub struct FusabiTuiModule;Expand description
Main module for registering TUI functions with the Fusabi VM
Implementations§
Source§impl FusabiTuiModule
impl FusabiTuiModule
Sourcepub fn register(&self, engine: &mut Engine) -> Result<()>
pub fn register(&self, engine: &mut Engine) -> Result<()>
Register native functions with the Fusabi VM
Registers the following functions:
tui_format_number(i64) -> string- Format large numbers (K/M/B)tui_format_bytes(i64) -> string- Format byte sizes (KB/MB/GB)tui_format_latency(i64) -> string- Format latency in microsecondstui_format_duration(i64) -> string- Format duration in seconds
§Example F# Usage
let count = 1500000L
let formatted = tui_format_number count // Returns "1.50M"
let size = 2048L
let formatted = tui_format_bytes size // Returns "2.00 KB"Trait Implementations§
Source§impl Clone for FusabiTuiModule
impl Clone for FusabiTuiModule
Source§fn clone(&self) -> FusabiTuiModule
fn clone(&self) -> FusabiTuiModule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FusabiTuiModule
impl RefUnwindSafe for FusabiTuiModule
impl Send for FusabiTuiModule
impl Sync for FusabiTuiModule
impl Unpin for FusabiTuiModule
impl UnwindSafe for FusabiTuiModule
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more