Working example of client

This commit is contained in:
Ondrej Babec
2022-02-26 15:12:19 +01:00
parent a862637a77
commit 3cb9de0371
17 changed files with 242 additions and 135 deletions

View File

@@ -1 +1 @@
pub mod network_trait;
pub mod network_trait;

View File

@@ -3,17 +3,17 @@ use core::future::Future;
use crate::packet::mqtt_packet::Packet;
#[derive(Debug)]
pub enum NetworkError {
Connection,
Unknown,
}
pub trait Network {
type ConnectionFuture<'m>: Future<Output = Result<(), NetworkError>>
where
Self: 'm;
Self: 'm;
type WriteFuture<'m>: Future<Output = Result<(), NetworkError>>
where