pub struct Host {
pub cfg: HostConfig,
pub runtime: Runtime,
pub connections: Arc<Mutex<Vec<Connection>>>,
pub task_listen: Option<JoinHandle<()>>,
pub store: Option<Db>,
pub reply_count: Arc<Mutex<usize>>,
}Expand description
Central coordination process, which stores published data and responds to requests
Fields§
§cfg: HostConfig§runtime: Runtime§connections: Arc<Mutex<Vec<Connection>>>§task_listen: Option<JoinHandle<()>>§store: Option<Db>§reply_count: Arc<Mutex<usize>>Implementations§
Source§impl Host
impl Host
Sourcepub fn start(&mut self) -> Result<(), Box<dyn Error>>
pub fn start(&mut self) -> Result<(), Box<dyn Error>>
Allow Host to begin accepting incoming connections
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Host
impl !RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl !UnwindSafe for Host
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