Struct shell_protocol::ShellProtocol
source · [−]pub struct ShellProtocol { /* private fields */ }
Expand description
Shell Service Protocol structure
This structure is only intended for usage inside of the shell service. It is not required for usage by shell clients.
Implementations
sourceimpl Protocol
impl Protocol
sourcepub fn new(
channel_protocol: ChannelProtocol,
channel_id: u32,
process: Box<ProcessHandler>
) -> Self
pub fn new(
channel_protocol: ChannelProtocol,
channel_id: u32,
process: Box<ProcessHandler>
) -> Self
Create new instance of shell protocol structure
Arguments
- channel_protocol - Instance of ChannelProtocol
- channel_id - Channel ID of shell session
- process - Instance of ProcessHandler
sourcepub fn message_engine<F>(
&mut self,
pump: F,
timeout: Duration
) -> Result<(), ProtocolError> where
F: Fn(Duration) -> Result<(ChannelMessage, SocketAddr), ProtocolError>,
pub fn message_engine<F>(
&mut self,
pump: F,
timeout: Duration
) -> Result<(), ProtocolError> where
F: Fn(Duration) -> Result<(ChannelMessage, SocketAddr), ProtocolError>,
Auto Trait Implementations
impl !RefUnwindSafe for Protocol
impl Send for Protocol
impl !Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more