Struct aether_lib::peer::Aether
source · [−]pub struct Aether { /* private fields */ }
Expand description
Aether
is an interface used to connect to other peers as well as communicate
with them
Implementations
sourceimpl Aether
impl Aether
pub fn new(tracker_addr: SocketAddr) -> Self
pub fn new_with_id(id: Id, tracker_addr: SocketAddr) -> Self
pub fn get_uid(&self) -> &str
pub fn start(&self)
pub fn connect(&self, uid: &str)
pub fn send_to(&self, uid: &str, buf: Vec<u8>) -> Result<u8, u8>
pub fn recv_from(&self, uid: &str) -> Result<Vec<u8>, AetherError>
pub fn wait_connection(&self, uid: &str) -> Result<u8, u8>
pub fn is_connected(&self, uid: &str) -> bool
pub fn is_connecting(&self, uid: &str) -> bool
pub fn is_initialized(&self, uid: &str) -> bool
Auto Trait Implementations
impl RefUnwindSafe for Aether
impl Send for Aether
impl Sync for Aether
impl Unpin for Aether
impl UnwindSafe for Aether
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more