pub struct RustBackend { /* private fields */ }Expand description
Rust-native compute backend.
Implements a simple push-pull encoding: each input channel is split
into a positive/negative pair. Channel i → output[i*2] (positive),
channel i → output[i*2+1] (negative magnitude).
Useful as a smoke-test stub and software fallback when external IPC is unavailable.
Implementations§
Source§impl RustBackend
impl RustBackend
Trait Implementations§
Source§impl Default for RustBackend
impl Default for RustBackend
Source§impl IpcBackend for RustBackend
impl IpcBackend for RustBackend
Source§fn process_batch(&mut self, inputs: &[f32]) -> Result<Vec<f32>, BackendError>
fn process_batch(&mut self, inputs: &[f32]) -> Result<Vec<f32>, BackendError>
Process a dynamic slice of input signals through the compute backend. Read more
Source§fn initialize(&mut self, _model_path: Option<&str>) -> Result<(), BackendError>
fn initialize(&mut self, _model_path: Option<&str>) -> Result<(), BackendError>
Initialise backend (load model weights, connect to IPC socket, etc.). Read more
Source§fn save_state(&self, _model_path: &str) -> Result<(), BackendError>
fn save_state(&self, _model_path: &str) -> Result<(), BackendError>
Persist current model state to
model_path.Source§fn get_spike_states(&self) -> Vec<bool>
fn get_spike_states(&self) -> Vec<bool>
Return per-channel spike states (true = spiked on last tick).
Auto Trait Implementations§
impl Freeze for RustBackend
impl RefUnwindSafe for RustBackend
impl Send for RustBackend
impl Sync for RustBackend
impl Unpin for RustBackend
impl UnsafeUnpin for RustBackend
impl UnwindSafe for RustBackend
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