pub struct ImapSessionOpen { /* private fields */ }Expand description
I/O-free IMAP session-opening coroutine.
Implementations§
Source§impl ImapSessionOpen
impl ImapSessionOpen
Sourcepub fn new(
transport: ImapSessionTransport,
sasl: Option<impl Into<Sasl>>,
opts: ImapSessionOpenOptions,
) -> Self
pub fn new( transport: ImapSessionTransport, sasl: Option<impl Into<Sasl>>, opts: ImapSessionOpenOptions, ) -> Self
Builds a session-opening coroutine reaching transport and
authenticating with sasl.
sasl of None stops after the greeting, which is what a
pre-authenticated socket proxy wants; a Some mechanism is
skipped anyway when the greeting turns out to be PREAUTH.
Trait Implementations§
Source§impl ImapCoroutine for ImapSessionOpen
impl ImapCoroutine for ImapSessionOpen
Source§type Yield = ImapSessionOpenYield
type Yield = ImapSessionOpenYield
The request type yielded while the coroutine progresses.
Source§type Return = Result<ImapSessionOpenData, ImapSessionOpenError>
type Return = Result<ImapSessionOpenData, ImapSessionOpenError>
The final value produced on completion.
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 Freeze for ImapSessionOpen
impl RefUnwindSafe for ImapSessionOpen
impl Send for ImapSessionOpen
impl Sync for ImapSessionOpen
impl Unpin for ImapSessionOpen
impl UnsafeUnpin for ImapSessionOpen
impl UnwindSafe for ImapSessionOpen
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