Skip to main content

BackendMessage

Enum BackendMessage 

Source
pub enum BackendMessage {
Show 27 variants AuthenticationOk, AuthenticationCleartextPassword, AuthenticationMd5Password([u8; 4]), AuthenticationSasl(Vec<String>), AuthenticationSaslContinue(Bytes), AuthenticationSaslFinal(Bytes), BackendKeyData { pid: i32, secret_key: i32, }, ParameterStatus { name: String, value: String, }, ReadyForQuery(u8), RowDescription(Vec<FieldDescription>), ParameterDescription(Vec<Oid>), DataRow(Bytes), CommandComplete(Bytes), ParseComplete, BindComplete, CloseComplete, NoData, PortalSuspended, EmptyQueryResponse, ErrorResponse(DbError), NoticeResponse(DbError), NotificationResponse { pid: i32, channel: String, payload: String, }, CopyInResponse { format: u8, column_formats: Vec<i16>, }, CopyOutResponse { format: u8, column_formats: Vec<i16>, }, CopyData(Bytes), CopyDone, NegotiateProtocolVersion { newest_minor: i32, unsupported: Vec<String>, },
}
Expand description

A decoded backend message.

Variants§

§

AuthenticationOk

Authentication succeeded.

§

AuthenticationCleartextPassword

Server requests a cleartext password.

§

AuthenticationMd5Password([u8; 4])

Server requests an MD5 password, with a 4-byte salt.

§

AuthenticationSasl(Vec<String>)

Server offers SASL mechanisms.

§

AuthenticationSaslContinue(Bytes)

SASL challenge.

§

AuthenticationSaslFinal(Bytes)

SASL completion.

§

BackendKeyData

Backend process id and secret key, for query cancellation.

Fields

§pid: i32

Backend process ID.

§secret_key: i32

Cancellation secret key.

§

ParameterStatus

A run-time parameter (e.g. server_version, integer_datetimes).

Fields

§name: String

Parameter name.

§value: String

Parameter value.

§

ReadyForQuery(u8)

The connection is ready for a new query.

§

RowDescription(Vec<FieldDescription>)

Description of the columns a statement or portal will return.

§

ParameterDescription(Vec<Oid>)

The parameter types a prepared statement expects.

§

DataRow(Bytes)

One result row; the payload starts with the column count.

§

CommandComplete(Bytes)

A statement completed, with its command tag.

§

ParseComplete

A Parse completed.

§

BindComplete

A Bind completed.

§

CloseComplete

A Close completed.

§

NoData

The statement/portal returns no rows.

§

PortalSuspended

A portal was suspended by the row limit.

§

EmptyQueryResponse

An empty query string produced no command.

§

ErrorResponse(DbError)

The server reported an error for the current request.

§

NoticeResponse(DbError)

A non-fatal notice, to be logged.

§

NotificationResponse

An asynchronous NOTIFY.

Fields

§pid: i32

Notifying backend process ID.

§channel: String

Channel name.

§payload: String

Notification payload.

§

CopyInResponse

The server is ready to receive COPY ... FROM STDIN data.

Fields

§format: u8

Overall format (0 text, 1 binary).

§column_formats: Vec<i16>

Per-column formats.

§

CopyOutResponse

The server will stream COPY ... TO STDOUT data.

Fields

§format: u8

Overall format (0 text, 1 binary).

§column_formats: Vec<i16>

Per-column formats.

§

CopyData(Bytes)

A chunk of COPY data.

§

CopyDone

The server finished streaming COPY data.

§

NegotiateProtocolVersion

The server advertises protocol version negotiation.

Fields

§newest_minor: i32

Newest supported minor protocol version.

§unsupported: Vec<String>

Unrecognized startup options.

Trait Implementations§

Source§

impl Debug for BackendMessage

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.