Skip to main content

Output

Enum Output 

Source
pub enum Output {
    Result {
        id: Option<String>,
        session: Option<String>,
        command_tag: String,
        columns: Vec<ColumnInfo>,
        rows: Vec<Value>,
        row_count: usize,
        truncated: bool,
        truncated_at_rows: Option<usize>,
        truncated_at_bytes: Option<usize>,
        trace: Trace,
    },
    ResultStart {
        id: String,
        session: Option<String>,
        columns: Vec<ColumnInfo>,
    },
    ResultRows {
        id: String,
        rows: Vec<Value>,
        rows_batch_count: usize,
    },
    ResultEnd {
        id: String,
        session: Option<String>,
        command_tag: String,
        trace: Trace,
    },
    SqlError {
        id: Option<String>,
        session: Option<String>,
        sqlstate: String,
        message: String,
        detail: Option<String>,
        hint: Option<String>,
        position: Option<String>,
        trace: Trace,
    },
    Error {
        id: Option<String>,
        error_code: String,
        error: String,
        sqlstate: Option<String>,
        message: Option<String>,
        detail: Option<String>,
        hint: Option<String>,
        retryable: bool,
        trace: Trace,
    },
    DryRun {
        id: Option<String>,
        sql: String,
        params: Vec<String>,
        session: Option<String>,
        param_types: Vec<String>,
        columns: Vec<ColumnInfo>,
        trace: Trace,
    },
    Config(RuntimeConfig),
    Pong {
        trace: PongTrace,
    },
    Close {
        message: String,
        trace: CloseTrace,
    },
    SessionInfo {
Show 17 fields id: Option<String>, session: String, transport_kind: String, permission_default: String, stream_rows_default: bool, batch_rows: usize, batch_bytes: usize, inline_max_rows: usize, inline_max_bytes: usize, statement_timeout_ms: u64, lock_timeout_ms: u64, database: Option<String>, user: Option<String>, host: Option<String>, port: Option<u16>, server_version: Option<String>, trace: Trace,
}, Log { event: String, request_id: Option<String>, session: Option<String>, error_code: Option<String>, command_tag: Option<String>, version: Option<String>, config: Option<Value>, args: Option<Value>, env: Option<Value>, chain: Option<String>, trace: Trace, }, }

Variants§

§

Result

Fields

§session: Option<String>
§command_tag: String
§columns: Vec<ColumnInfo>
§rows: Vec<Value>
§row_count: usize
§truncated: bool

True when rows is a prefix of the full result — emit when the inline row or byte cap was hit. Default-false serializes elided.

§truncated_at_rows: Option<usize>

Inline-row cap if that’s what fired.

§truncated_at_bytes: Option<usize>

Inline-byte cap if that’s what fired.

§trace: Trace
§

ResultStart

Fields

§session: Option<String>
§columns: Vec<ColumnInfo>
§

ResultRows

Fields

§rows: Vec<Value>
§rows_batch_count: usize
§

ResultEnd

Fields

§session: Option<String>
§command_tag: String
§trace: Trace
§

SqlError

Fields

§session: Option<String>
§sqlstate: String
§message: String
§detail: Option<String>
§position: Option<String>
§trace: Trace
§

Error

Fields

§error_code: String
§error: String
§sqlstate: Option<String>
§message: Option<String>
§detail: Option<String>
§retryable: bool
§trace: Trace
§

DryRun

Fields

§params: Vec<String>
§session: Option<String>
§param_types: Vec<String>

Inferred PostgreSQL parameter types in placeholder order ($1, $2, …). Populated when the server-side PREPARE succeeds.

§columns: Vec<ColumnInfo>

Output columns inferred from the prepared statement (empty for non-SELECT statements).

§trace: Trace
§

Config(RuntimeConfig)

§

Pong

Fields

§

Close

Fields

§message: String
§

SessionInfo

Fields

§session: String
§transport_kind: String
§permission_default: String
§stream_rows_default: bool
§batch_rows: usize
§batch_bytes: usize
§inline_max_rows: usize
§inline_max_bytes: usize
§statement_timeout_ms: u64
§lock_timeout_ms: u64
§database: Option<String>
§port: Option<u16>
§server_version: Option<String>
§trace: Trace
§

Log

Fields

§event: String
§request_id: Option<String>
§session: Option<String>
§error_code: Option<String>
§command_tag: Option<String>
§version: Option<String>
§config: Option<Value>
§trace: Trace

Trait Implementations§

Source§

impl Debug for Output

Source§

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

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

impl Serialize for Output

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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 = 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.