pub struct WasmRunner { /* private fields */ }Expand description
WASM development server runner
Implementations§
Source§impl WasmRunner
impl WasmRunner
Sourcepub fn new(config: WasmRunnerConfig) -> Self
pub fn new(config: WasmRunnerConfig) -> Self
Create a new runner with configuration
Sourcepub fn builder() -> WasmRunnerBuilder
pub fn builder() -> WasmRunnerBuilder
Create a builder
Sourcepub fn config(&self) -> &WasmRunnerConfig
pub fn config(&self) -> &WasmRunnerConfig
Get configuration
Sourcepub fn debug_output(&self) -> &DebugOutput
pub fn debug_output(&self) -> &DebugOutput
Get debug output configuration
Sourcepub fn set_debug_output(&mut self, output: DebugOutput)
pub fn set_debug_output(&mut self, output: DebugOutput)
Set debug output configuration
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if server is running
Sourcepub fn client_count(&self) -> usize
pub fn client_count(&self) -> usize
Get connected client count
Sourcepub fn simulate_start(&mut self)
pub fn simulate_start(&mut self)
Simulate starting the server (for testing)
Sourcepub fn simulate_stop(&mut self)
pub fn simulate_stop(&mut self)
Simulate stopping the server (for testing)
Sourcepub fn simulate_client_connect(&mut self) -> u32
pub fn simulate_client_connect(&mut self) -> u32
Simulate client connection (for testing)
Sourcepub fn simulate_client_disconnect(&mut self, id: u32)
pub fn simulate_client_disconnect(&mut self, id: u32)
Simulate client disconnection (for testing)
Sourcepub fn format_console_message(&self, msg: &ConsoleMessage) -> String
pub fn format_console_message(&self, msg: &ConsoleMessage) -> String
Format a console message for terminal output
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WasmRunner
impl RefUnwindSafe for WasmRunner
impl Send for WasmRunner
impl Sync for WasmRunner
impl Unpin for WasmRunner
impl UnsafeUnpin for WasmRunner
impl UnwindSafe for WasmRunner
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 more