Enum makiko::TunnelEvent
source · #[non_exhaustive]pub enum TunnelEvent {
Data(Bytes),
Eof,
}
Expand description
An event returned from TunnelReceiver
.
These are events related to a particular SSH tunnel, they correspond to the data sent by the server.
This enum is marked as #[non_exhaustive]
, so that we can add new variants without breaking
backwards compatibility. It should always be safe to ignore any events that you don’t intend to
handle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Data(Bytes)
Data received from the tunnel.
You should handle this data as a byte stream, the boundaries between consecutive Data
events might be arbitrary.
Eof
End of file received from the tunnel.
After this, we should not receive more data from the tunnel, but the tunnel is not yet closed.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TunnelEvent
impl Send for TunnelEvent
impl Sync for TunnelEvent
impl Unpin for TunnelEvent
impl UnwindSafe for TunnelEvent
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