Struct coord::SessionClient[][src]

pub struct SessionClient { /* fields omitted */ }

A coordinator client that is bound to a connection.

You must call SessionClient::terminate rather than dropping a session client directly. Dropping an unterminated SessionClient will panic.

See also Client.

Implementations

impl SessionClient[src]

pub fn canceled(&self) -> impl Future<Output = ()> + Send[src]

pub fn reset_canceled(&mut self)[src]

pub async fn describe(
    &mut self,
    name: String,
    stmt: Option<Statement<Raw>>,
    param_types: Vec<Option<Type>>
) -> Result<(), CoordError>
[src]

Saves the specified statement as a prepared statement.

The prepared statement is saved in the connection's [sql::Session] under the specified name.

pub async fn declare(
    &mut self,
    name: String,
    stmt: Statement<Raw>,
    param_types: Vec<Option<Type>>
) -> Result<(), CoordError>
[src]

Binds a statement to a portal.

pub async fn execute(
    &mut self,
    portal_name: String
) -> Result<ExecuteResponse, CoordError>
[src]

Executes a previously-bound portal.

pub async fn end_transaction(
    &mut self,
    action: EndTransactionAction
) -> Result<ExecuteResponse, CoordError>
[src]

Ends a transaction.

pub async fn dump_catalog(&mut self) -> Result<String, CoordError>[src]

Dumps the catalog to a JSON string.

pub async fn terminate(self)[src]

Terminates this client session.

This method cleans up any coordinator state associated with the session before consuming the `SessionClient. Call this method instead of dropping the object directly.

pub fn session(&mut self) -> &mut Session[src]

Returns a mutable reference to the session bound to this client.

Trait Implementations

impl Drop for SessionClient[src]

Auto Trait Implementations

impl !RefUnwindSafe for SessionClient[src]

impl Send for SessionClient[src]

impl !Sync for SessionClient[src]

impl Unpin for SessionClient[src]

impl !UnwindSafe for SessionClient[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]