pub struct BmpClient { /* private fields */ }Expand description
§BmpClient
Holds the TcpStream and Decoder state
let client = BmpClient::new(tcp_stream)?;
let decoded_message = client.recv()?;Implementations§
Source§impl BmpClient
impl BmpClient
Sourcepub async fn recv(&mut self) -> Option<Result<BmpMessage, Error>>
pub async fn recv(&mut self) -> Option<Result<BmpMessage, Error>>
Returns a Future that will resolve to the next message
Returns an error if the client disconnects or if there is an error decoding the message
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BmpClient
impl !RefUnwindSafe for BmpClient
impl Send for BmpClient
impl Sync for BmpClient
impl Unpin for BmpClient
impl !UnwindSafe for BmpClient
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