[−][src]Struct loco_protocol::network::ChannelConnection
ChannelConnection wrap command stream and process it. The response command will only send to sender channel. If response command doesn't have sender, It will treat as broadcast command and will be sent to every channel attached.
Implementations
impl<A: Read + Write> ChannelConnection<A>
[src]
pub fn new(processor: CommandProcessor<A>) -> Self
[src]
pub fn processor(&self) -> &CommandProcessor<A>
[src]
pub fn channel_map(&self) -> &HashMap<u32, ConnectionChannel>
[src]
pub fn create_channel(&mut self) -> ConnectionChannel
[src]
Attach channel between instance. The returned ConnectionChannel struct is user side Channel.
pub fn detach_channel(
&mut self,
channel: ConnectionChannel
) -> (ConnectionChannel, Option<ConnectionChannel>)
[src]
&mut self,
channel: ConnectionChannel
) -> (ConnectionChannel, Option<ConnectionChannel>)
pub fn process(&mut self) -> Result<(), Error>
[src]
Auto Trait Implementations
impl<A> !RefUnwindSafe for ChannelConnection<A>
impl<A> Send for ChannelConnection<A> where
A: Send,
A: Send,
impl<A> !Sync for ChannelConnection<A>
impl<A> Unpin for ChannelConnection<A> where
A: Unpin,
A: Unpin,
impl<A> !UnwindSafe for ChannelConnection<A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,