pub struct Event {
pub id: TransactionId,
pub result: Result<Message>,
}Expand description
Event is passed to Handler describing the transaction event. Do not reuse outside Handler.
Fields§
§id: TransactionId§result: Result<Message>Trait Implementations§
Source§impl Protocol<TransportMessage<BytesMut>, Message, Event> for Client
impl Protocol<TransportMessage<BytesMut>, Message, Event> for Client
Source§fn poll_write(&mut self) -> Option<Self::Wout>
fn poll_write(&mut self) -> Option<Self::Wout>
Returns packets to transmit
It should be polled for transmit after:
- the application performed some I/O
- a call was made to
handle_read - a call was made to
handle_write - a call was made to
handle_timeout
Source§fn handle_read(&mut self, msg: TaggedBytesMut) -> Result<()>
fn handle_read(&mut self, msg: TaggedBytesMut) -> Result<()>
Handle an incoming read message. Read more
Source§fn handle_write(&mut self, m: Message) -> Result<()>
fn handle_write(&mut self, m: Message) -> Result<()>
Handle an outgoing write message. Read more
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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