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 parse(self) -> DualSession<ParseResponse>

Applies the dual parse transition and enters ParseResponse.

Source

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

Applies the dual bind transition and enters BindResponse.

Source

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

Applies the dual describe transition and enters DescribeResponse.

Source

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

Applies the dual execute transition and enters ExecuteResponse.

Source

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

Applies the dual close transition and enters CloseResponse.

Source

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

Applies the dual function_call transition and enters FunctionResponse.

Source

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

Applies the dual terminate transition and enters Terminated.

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 copy_in(self) -> DualSession<SimpleCopyIn>

Applies the dual copy_in transition and enters SimpleCopyIn.

Source

pub const fn copy_out(self) -> DualSession<SimpleCopyOut>

Applies the dual copy_out transition and enters SimpleCopyOut.

Source

pub const fn copy_both(self) -> DualSession<SimpleCopyBoth>

Applies the dual copy_both transition and enters SimpleCopyBoth.

Source

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

Applies the dual ready transition and enters Ready.

Source

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

Applies the dual error transition and enters SimpleError.

Source§

impl DualSession<SimpleError>

Source

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

Applies the dual ready transition and enters Ready.

Source§

impl DualSession<Building>

Source

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

Applies the dual parse transition and enters ParseResponse.

Source

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

Applies the dual bind transition and enters BindResponse.

Source

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

Applies the dual describe transition and enters DescribeResponse.

Source

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

Applies the dual execute transition and enters ExecuteResponse.

Source

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

Applies the dual close transition and enters CloseResponse.

Source

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

Applies the dual flush transition and enters Building.

Source

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

Applies the dual sync transition and enters SyncResponse.

Source§

impl DualSession<ParseResponse>

Source

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

Applies the dual complete transition and enters Building.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<BindResponse>

Source

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

Applies the dual complete transition and enters Building.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<DescribeResponse>

Source

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

Applies the dual row_description transition and enters Building.

Source

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

Applies the dual no_data transition and enters Building.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExecuteResponse>

Source

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

Applies the dual continue_response transition and enters ExecuteResponse.

Source

pub const fn copy_in(self) -> DualSession<ExtendedCopyIn>

Applies the dual copy_in transition and enters ExtendedCopyIn.

Source

pub const fn copy_out(self) -> DualSession<ExtendedCopyOut>

Applies the dual copy_out transition and enters ExtendedCopyOut.

Source

pub const fn copy_both(self) -> DualSession<ExtendedCopyBoth>

Applies the dual copy_both transition and enters ExtendedCopyBoth.

Source

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

Applies the dual command_complete transition and enters Building.

Source

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

Applies the dual portal_suspended transition and enters Building.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<CloseResponse>

Source

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

Applies the dual complete transition and enters Building.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExtendedError>

Source

pub const fn discard(self) -> DualSession<ExtendedError>

Applies the dual discard transition and enters ExtendedError.

Source

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

Applies the dual sync transition and enters SyncResponse.

Source§

impl DualSession<SyncResponse>

Source

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

Applies the dual ready transition and enters Ready.

Source§

impl DualSession<FunctionResponse>

Source

pub const fn result(self) -> DualSession<FunctionReady>

Applies the dual result transition and enters FunctionReady.

Source

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

Applies the dual error transition and enters FunctionReady.

Source§

impl DualSession<FunctionReady>

Source

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

Applies the dual ready transition and enters Ready.

Source§

impl DualSession<SimpleCopyIn>

Source

pub const fn data(self) -> DualSession<SimpleCopyIn>

Applies the dual data transition and enters SimpleCopyIn.

Source

pub const fn done(self) -> DualSession<SimpleCopyInDone>

Applies the dual done transition and enters SimpleCopyInDone.

Source

pub const fn fail(self) -> DualSession<SimpleCopyInFailed>

Applies the dual fail transition and enters SimpleCopyInFailed.

Source§

impl DualSession<SimpleCopyInDone>

Source

pub const fn command_complete(self) -> DualSession<SimpleCopyReady>

Applies the dual command_complete transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyInFailed>

Source

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

Applies the dual error transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyOut>

Source

pub const fn data(self) -> DualSession<SimpleCopyOut>

Applies the dual data transition and enters SimpleCopyOut.

Source

pub const fn done(self) -> DualSession<SimpleCopyOutDone>

Applies the dual done transition and enters SimpleCopyOutDone.

Source

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

Applies the dual error transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyOutDone>

Source

pub const fn command_complete(self) -> DualSession<SimpleCopyReady>

Applies the dual command_complete transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyReady>

Source

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

Applies the dual ready transition and enters Ready.

Source§

impl DualSession<ExtendedCopyIn>

Source

pub const fn data(self) -> DualSession<ExtendedCopyIn>

Applies the dual data transition and enters ExtendedCopyIn.

Source

pub const fn done(self) -> DualSession<ExtendedCopyInDone>

Applies the dual done transition and enters ExtendedCopyInDone.

Source

pub const fn fail(self) -> DualSession<ExtendedCopyInFailed>

Applies the dual fail transition and enters ExtendedCopyInFailed.

Source§

impl DualSession<ExtendedCopyInDone>

Source

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

Applies the dual command_complete transition and enters Building.

Source§

impl DualSession<ExtendedCopyInFailed>

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExtendedCopyOut>

Source

pub const fn data(self) -> DualSession<ExtendedCopyOut>

Applies the dual data transition and enters ExtendedCopyOut.

Source

pub const fn done(self) -> DualSession<ExtendedCopyOutDone>

Applies the dual done transition and enters ExtendedCopyOutDone.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExtendedCopyOutDone>

Source

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

Applies the dual command_complete transition and enters Building.

Source§

impl DualSession<SimpleCopyBoth>

Source

pub const fn send_data(self) -> DualSession<SimpleCopyBoth>

Applies the dual send_data transition and enters SimpleCopyBoth.

Source

pub const fn receive_data(self) -> DualSession<SimpleCopyBoth>

Applies the dual receive_data transition and enters SimpleCopyBoth.

Source

pub const fn send_done(self) -> DualSession<SimpleCopyBothServerDone>

Applies the dual send_done transition and enters SimpleCopyBothServerDone.

Source

pub const fn receive_done(self) -> DualSession<SimpleCopyBothClientDone>

Applies the dual receive_done transition and enters SimpleCopyBothClientDone.

Source

pub const fn fail(self) -> DualSession<SimpleCopyBothFailed>

Applies the dual fail transition and enters SimpleCopyBothFailed.

Source

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

Applies the dual error transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyBothClientDone>

Source

pub const fn send_data(self) -> DualSession<SimpleCopyBothClientDone>

Applies the dual send_data transition and enters SimpleCopyBothClientDone.

Source

pub const fn send_done(self) -> DualSession<SimpleCopyBothDone>

Applies the dual send_done transition and enters SimpleCopyBothDone.

Source

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

Applies the dual error transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyBothServerDone>

Source

pub const fn receive_data(self) -> DualSession<SimpleCopyBothServerDone>

Applies the dual receive_data transition and enters SimpleCopyBothServerDone.

Source

pub const fn receive_done(self) -> DualSession<SimpleCopyBothDone>

Applies the dual receive_done transition and enters SimpleCopyBothDone.

Source

pub const fn fail(self) -> DualSession<SimpleCopyBothFailed>

Applies the dual fail transition and enters SimpleCopyBothFailed.

Source§

impl DualSession<SimpleCopyBothDone>

Source

pub const fn command_complete(self) -> DualSession<SimpleCopyReady>

Applies the dual command_complete transition and enters SimpleCopyReady.

Source§

impl DualSession<SimpleCopyBothFailed>

Source

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

Applies the dual error transition and enters SimpleCopyReady.

Source§

impl DualSession<ExtendedCopyBoth>

Source

pub const fn send_data(self) -> DualSession<ExtendedCopyBoth>

Applies the dual send_data transition and enters ExtendedCopyBoth.

Source

pub const fn receive_data(self) -> DualSession<ExtendedCopyBoth>

Applies the dual receive_data transition and enters ExtendedCopyBoth.

Source

pub const fn send_done(self) -> DualSession<ExtendedCopyBothServerDone>

Applies the dual send_done transition and enters ExtendedCopyBothServerDone.

Source

pub const fn receive_done(self) -> DualSession<ExtendedCopyBothClientDone>

Applies the dual receive_done transition and enters ExtendedCopyBothClientDone.

Source

pub const fn fail(self) -> DualSession<ExtendedCopyBothFailed>

Applies the dual fail transition and enters ExtendedCopyBothFailed.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExtendedCopyBothClientDone>

Source

pub const fn send_data(self) -> DualSession<ExtendedCopyBothClientDone>

Applies the dual send_data transition and enters ExtendedCopyBothClientDone.

Source

pub const fn send_done(self) -> DualSession<ExtendedCopyBothDone>

Applies the dual send_done transition and enters ExtendedCopyBothDone.

Source

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

Applies the dual error transition and enters ExtendedError.

Source§

impl DualSession<ExtendedCopyBothServerDone>

Source

pub const fn receive_data(self) -> DualSession<ExtendedCopyBothServerDone>

Applies the dual receive_data transition and enters ExtendedCopyBothServerDone.

Source

pub const fn receive_done(self) -> DualSession<ExtendedCopyBothDone>

Applies the dual receive_done transition and enters ExtendedCopyBothDone.

Source

pub const fn fail(self) -> DualSession<ExtendedCopyBothFailed>

Applies the dual fail transition and enters ExtendedCopyBothFailed.

Source§

impl DualSession<ExtendedCopyBothDone>

Source

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

Applies the dual command_complete transition and enters Building.

Source§

impl DualSession<ExtendedCopyBothFailed>

Source

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

Applies the dual error transition and enters ExtendedError.

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.