pub struct SendImapCommand<T: Encoder> { /* private fields */ }Expand description
I/O-free coroutine sending one IMAP command and parsing its response.
Implementations§
Source§impl<T: Encoder> SendImapCommand<T>
impl<T: Encoder> SendImapCommand<T>
pub fn new(encoder: T, message: T::Message<'static>) -> Self
Sourcepub fn resume(
&mut self,
fragmentizer: &mut Fragmentizer,
arg: Option<&[u8]>,
) -> SendImapCommandResult<T>
pub fn resume( &mut self, fragmentizer: &mut Fragmentizer, arg: Option<&[u8]>, ) -> SendImapCommandResult<T>
Pass None initially or after WantsWrite, Some(bytes)
after WantsRead, Some(&[]) on EOF.
Trait Implementations§
Source§impl<T: Encoder> ImapCoroutine for SendImapCommand<T>
impl<T: Encoder> ImapCoroutine for SendImapCommand<T>
type Yield = ImapYield
type Return = Result<SendImapCommandOk<T>, SendImapCommandError>
Source§fn resume(
&mut self,
fragmentizer: &mut Fragmentizer,
arg: Option<&[u8]>,
) -> ImapCoroutineState<Self::Yield, Self::Return>
fn resume( &mut self, fragmentizer: &mut Fragmentizer, arg: Option<&[u8]>, ) -> ImapCoroutineState<Self::Yield, Self::Return>
Pass
None initially or after a WantsWrite, Some(bytes)
after a WantsRead, Some(&[]) on EOF.Auto Trait Implementations§
impl<T> Freeze for SendImapCommand<T>
impl<T> RefUnwindSafe for SendImapCommand<T>
impl<T> Send for SendImapCommand<T>
impl<T> Sync for SendImapCommand<T>
impl<T> Unpin for SendImapCommand<T>
impl<T> UnsafeUnpin for SendImapCommand<T>
impl<T> UnwindSafe for SendImapCommand<T>
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