pub trait Channel: ChannelError + for<'a> ChannelFuture<'a> {
// Required methods
fn send<'a, S, P>(
&'a mut self,
packet: P,
scope: &'a Scope<'_>,
) -> <Self as ChannelFuture<'a>>::Send
where S: Schema,
P: Pack<S>;
fn send_reliable<'a, S, P>(
&'a mut self,
packet: P,
scope: &'a Scope<'_>,
) -> <Self as ChannelFuture<'a>>::Send
where S: Schema,
P: Pack<S>;
fn recv_ready(&mut self) -> <Self as ChannelFuture<'_>>::Ready;
fn recv<'a, S>(
&mut self,
scope: &'a Scope<'_>,
) -> Result<Option<Unpacked<'a, S>>, Self::Error>
where S: Schema;
}Expand description
Abstract raw bytes channel that can be used by evoke sessions.
Required Methods§
Sourcefn send<'a, S, P>(
&'a mut self,
packet: P,
scope: &'a Scope<'_>,
) -> <Self as ChannelFuture<'a>>::Send
fn send<'a, S, P>( &'a mut self, packet: P, scope: &'a Scope<'_>, ) -> <Self as ChannelFuture<'a>>::Send
Attempts to send packet through the channel unreliably. Packet either arrives complete or lost.
Sourcefn send_reliable<'a, S, P>(
&'a mut self,
packet: P,
scope: &'a Scope<'_>,
) -> <Self as ChannelFuture<'a>>::Send
fn send_reliable<'a, S, P>( &'a mut self, packet: P, scope: &'a Scope<'_>, ) -> <Self as ChannelFuture<'a>>::Send
Attempts to send packet through the channel reliabliy. Packet will arrive unless channel connection is lost.
Sourcefn recv_ready(&mut self) -> <Self as ChannelFuture<'_>>::Ready
fn recv_ready(&mut self) -> <Self as ChannelFuture<'_>>::Ready
Waits until channel is ready for recv call.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.