Struct Hub
pub struct Hub { /* private fields */ }Implementations§
§impl Hub
impl Hub
pub fn spawner(&self) -> AsyncSpawner
pub fn get_id(&self) -> NodeID
pub fn signing_key(&self) -> Arc<NodeSigningKey>
pub async fn start(&mut self) -> Result<(), HubError>
pub async fn add_peer( &mut self, id: NodeID, addr: String, ) -> Result<(), HubError>
pub async fn remove_peer(&mut self, id: NodeID) -> Result<(), HubError>
pub fn outbound(&self, id: NodeID) -> Result<RequestSender, HubError>
pub fn inbound(&self, id: NodeID) -> Result<RequestReceiver, HubError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hub
impl !RefUnwindSafe for Hub
impl Send for Hub
impl Sync for Hub
impl Unpin for Hub
impl !UnwindSafe for Hub
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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