pub enum SendMessage {
SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
Variants§
SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId
.
Ping([u8; 8])
Sends a ping message to the connected relay server.
Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
type Error = ConnSendError
The type of value produced by the sink when an error occurs.
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn start_send(
self: Pin<&mut Self>,
item: SendMessage,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, item: SendMessage, ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreSource§impl Sink<SendMessage> for ClientSink
impl Sink<SendMessage> for ClientSink
Source§type Error = ConnSendError
type Error = ConnSendError
The type of value produced by the sink when an error occurs.
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn start_send(
self: Pin<&mut Self>,
item: SendMessage,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, item: SendMessage, ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreAuto Trait Implementations§
impl !Freeze for SendMessage
impl RefUnwindSafe for SendMessage
impl Send for SendMessage
impl Sync for SendMessage
impl Unpin for SendMessage
impl UnwindSafe for SendMessage
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