pub struct Channel {
pub name: String,
pub from: ChannelFrom,
pub lifetime: ChannelLifetime,
pub backend: ChannelBackend,
pub channel_id: Option<u64>,
pub requests: Vec<Request>,
pub events: Vec<Event>,
}Expand description
A communication channel — the unit of request/response and event traffic.
Fields§
§name: StringChannel name (e.g. "ping-pong").
from: ChannelFromWhich peer opens the channel.
lifetime: ChannelLifetimeHow long the channel lives.
backend: ChannelBackendWire backend. Defaults to ChannelBackend::Stream.
channel_id: Option<u64>Demux identifier, required when Self::backend is
ChannelBackend::Datagram. A positive integer (1..).
requests: Vec<Request>Request/response definitions in source order. Always empty for a datagram channel (datagram channels carry events only).
events: Vec<Event>Event definitions in source order.
Trait Implementations§
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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