Files
unshell/unshell-lib/src/network/mod.rs
T

19 lines
424 B
Rust
Raw Normal View History

mod connection;
pub use connection::Connection;
use crate::ModuleError;
/// This is the data transmission type
pub trait Stream<T>: Send + Sync {
// fn get_info(&self) -> String;
fn is_alive(&self) -> bool;
fn len(&self) -> usize;
2025-11-25 15:22:14 -07:00
fn read(&self) -> Vec<T>;
fn write(&mut self, data: T) -> Result<(), ModuleError>;
fn try_clone(&self) -> Result<Box<dyn Stream<T> + Send + Sync>, ModuleError>;
}