Skip to main content

DualSession

Struct DualSession 

Source
pub struct DualSession<Phase> { /* private fields */ }
Expand description

Typestate witness for the role dual to Session.

Implementations§

Source§

impl DualSession<Ready>

Source

pub const fn new() -> Self

Creates a dual witness in the grammar’s initial phase.

Source§

impl DualSession<Ready>

Source

pub const fn query(self) -> DualSession<Simple>

Applies the dual query transition and enters Simple.

Source

pub const fn begin_extended(self) -> DualSession<Building>

Applies the dual begin_extended transition and enters Building.

Source

pub const fn function_call(self) -> DualSession<FunctionCalling>

Applies the dual function_call transition and enters FunctionCalling.

Source

pub const fn reset(self) -> DualSession<Resetting>

Applies the dual reset transition and enters Resetting.

Source

pub const fn terminate(self) -> DualSession<Terminated>

Applies the dual terminate transition and enters Terminated.

Source§

impl DualSession<FunctionCalling>

Source

pub const fn function_response(self) -> DualSession<AwaitingReady>

Applies the dual function_response transition and enters AwaitingReady.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<Simple>

Source

pub const fn continue_response(self) -> DualSession<Simple>

Applies the dual continue_response transition and enters Simple.

Source

pub const fn enter_copy_in(self) -> DualSession<CopyIn>

Applies the dual enter_copy_in transition and enters CopyIn.

Source

pub const fn enter_copy_out(self) -> DualSession<CopyOut>

Applies the dual enter_copy_out transition and enters CopyOut.

Source

pub const fn enter_copy_both(self) -> DualSession<CopyBoth>

Applies the dual enter_copy_both transition and enters CopyBoth.

Source

pub const fn ready(self) -> DualSession<Ready>

Applies the dual ready transition and enters Ready.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<Building>

Source

pub const fn parse(self) -> DualSession<Building>

Applies the dual parse transition and enters Building.

Source

pub const fn describe(self) -> DualSession<Building>

Applies the dual describe transition and enters Building.

Source

pub const fn bind(self) -> DualSession<BoundBuilding>

Applies the dual bind transition and enters BoundBuilding.

Source

pub const fn close(self) -> DualSession<Building>

Applies the dual close transition and enters Building.

Source

pub const fn flush(self) -> DualSession<Building>

Applies the dual flush transition and enters Building.

Source

pub const fn sync(self) -> DualSession<AwaitingReady>

Applies the dual sync transition and enters AwaitingReady.

Source§

impl DualSession<BoundBuilding>

Source

pub const fn parse(self) -> DualSession<BoundBuilding>

Applies the dual parse transition and enters BoundBuilding.

Source

pub const fn describe(self) -> DualSession<BoundBuilding>

Applies the dual describe transition and enters BoundBuilding.

Source

pub const fn bind(self) -> DualSession<BoundBuilding>

Applies the dual bind transition and enters BoundBuilding.

Source

pub const fn execute(self) -> DualSession<BoundBuilding>

Applies the dual execute transition and enters BoundBuilding.

Source

pub const fn close(self) -> DualSession<BoundBuilding>

Applies the dual close transition and enters BoundBuilding.

Source

pub const fn flush(self) -> DualSession<BoundBuilding>

Applies the dual flush transition and enters BoundBuilding.

Source

pub const fn sync(self) -> DualSession<AwaitingReady>

Applies the dual sync transition and enters AwaitingReady.

Source§

impl DualSession<AwaitingReady>

Source

pub const fn continue_response(self) -> DualSession<AwaitingReady>

Applies the dual continue_response transition and enters AwaitingReady.

Source

pub const fn ready(self) -> DualSession<Ready>

Applies the dual ready transition and enters Ready.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<CopyIn>

Source

pub const fn copy_data(self) -> DualSession<CopyIn>

Applies the dual copy_data transition and enters CopyIn.

Source

pub const fn copy_done(self) -> DualSession<AwaitingReady>

Applies the dual copy_done transition and enters AwaitingReady.

Source

pub const fn copy_fail(self) -> DualSession<AwaitingReady>

Applies the dual copy_fail transition and enters AwaitingReady.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<CopyOut>

Source

pub const fn copy_data(self) -> DualSession<CopyOut>

Applies the dual copy_data transition and enters CopyOut.

Source

pub const fn copy_done(self) -> DualSession<AwaitingReady>

Applies the dual copy_done transition and enters AwaitingReady.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<CopyBoth>

Source

pub const fn send_copy_data(self) -> DualSession<CopyBoth>

Applies the dual send_copy_data transition and enters CopyBoth.

Source

pub const fn receive_copy_data(self) -> DualSession<CopyBoth>

Applies the dual receive_copy_data transition and enters CopyBoth.

Source

pub const fn send_copy_done(self) -> DualSession<CopyBothClientDone>

Applies the dual send_copy_done transition and enters CopyBothClientDone.

Source

pub const fn receive_copy_done(self) -> DualSession<CopyBothServerDone>

Applies the dual receive_copy_done transition and enters CopyBothServerDone.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<CopyBothClientDone>

Source

pub const fn receive_copy_data(self) -> DualSession<CopyBothClientDone>

Applies the dual receive_copy_data transition and enters CopyBothClientDone.

Source

pub const fn receive_copy_done(self) -> DualSession<AwaitingReady>

Applies the dual receive_copy_done transition and enters AwaitingReady.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<CopyBothServerDone>

Source

pub const fn send_copy_data(self) -> DualSession<CopyBothServerDone>

Applies the dual send_copy_data transition and enters CopyBothServerDone.

Source

pub const fn send_copy_done(self) -> DualSession<AwaitingReady>

Applies the dual send_copy_done transition and enters AwaitingReady.

Source§

impl DualSession<Draining>

Source

pub const fn continue_response(self) -> DualSession<Draining>

Applies the dual continue_response transition and enters Draining.

Source

pub const fn ready(self) -> DualSession<Ready>

Applies the dual ready transition and enters Ready.

Source§

impl DualSession<Resetting>

Source

pub const fn continue_reset(self) -> DualSession<Resetting>

Applies the dual continue_reset transition and enters Resetting.

Source

pub const fn discard_complete(self) -> DualSession<ResetComplete>

Applies the dual discard_complete transition and enters ResetComplete.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Source§

impl DualSession<ResetComplete>

Source

pub const fn continue_reset(self) -> DualSession<ResetComplete>

Applies the dual continue_reset transition and enters ResetComplete.

Source

pub const fn ready_clean(self) -> DualSession<Ready>

Applies the dual ready_clean transition and enters Ready.

Source

pub const fn ready_dirty(self) -> DualSession<Ready>

Applies the dual ready_dirty transition and enters Ready.

Source

pub const fn error(self) -> DualSession<Draining>

Applies the dual error transition and enters Draining.

Trait Implementations§

Source§

impl<Phase: Clone> Clone for DualSession<Phase>

Source§

fn clone(&self) -> DualSession<Phase>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Phase: Copy> Copy for DualSession<Phase>

Source§

impl<Phase: Debug> Debug for DualSession<Phase>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Phase: Eq> Eq for DualSession<Phase>

Source§

impl<Phase: PartialEq> PartialEq for DualSession<Phase>

Source§

fn eq(&self, other: &DualSession<Phase>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Phase: PartialEq> StructuralPartialEq for DualSession<Phase>

Auto Trait Implementations§

§

impl<Phase> Freeze for DualSession<Phase>

§

impl<Phase> RefUnwindSafe for DualSession<Phase>
where Phase: RefUnwindSafe,

§

impl<Phase> Send for DualSession<Phase>
where Phase: Send,

§

impl<Phase> Sync for DualSession<Phase>
where Phase: Sync,

§

impl<Phase> Unpin for DualSession<Phase>
where Phase: Unpin,

§

impl<Phase> UnsafeUnpin for DualSession<Phase>

§

impl<Phase> UnwindSafe for DualSession<Phase>
where Phase: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.