[−][src]Struct loco_protocol::command::processor::CommandProcessor
Like BufReader and BufWriter, provide optimized Command read/write operation to stream.
Implementations
impl<S: Read + Write> CommandProcessor<S>[src]
pub fn new(stream: S) -> Self[src]
pub fn stream(&self) -> &S[src]
pub fn stream_mut(&mut self) -> &mut S[src]
pub fn current_header(&self) -> Option<Header>[src]
pub fn into_inner(self) -> S[src]
Consume this CommandProcessor and unwrap stream
pub fn read_commmand(&mut self) -> Result<Option<Command>, Error>[src]
Try to read one command
pub fn write_commmand(&mut self, command: Command) -> Result<usize, Error>[src]
Write command to stream.
Auto Trait Implementations
impl<S> RefUnwindSafe for CommandProcessor<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for CommandProcessor<S> where
S: Send,
S: Send,
impl<S> Sync for CommandProcessor<S> where
S: Sync,
S: Sync,
impl<S> Unpin for CommandProcessor<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for CommandProcessor<S> where
S: UnwindSafe,
S: UnwindSafe,
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>,