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,
        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,
        hint: Option<String>,
        retryable: bool,
        trace: Trace,
    },
    DryRun {
        id: Option<String>,
        sql: String,
        params: Vec<String>,
        session: Option<String>,
        trace: Trace,
    },
    Config(RuntimeConfig),
    Pong {
        trace: PongTrace,
    },
    Close {
        message: String,
        trace: CloseTrace,
    },
    Log {
        event: String,
        request_id: Option<String>,
        session: Option<String>,
        error_code: Option<String>,
        command_tag: Option<String>,
        version: Option<String>,
        argv: Option<Vec<String>>,
        config: Option<Value>,
        args: Option<Value>,
        env: Option<Value>,
        trace: Trace,
    },
}

Variants§

§

Result

Fields

§session: Option<String>
§command_tag: String
§columns: Vec<ColumnInfo>
§rows: Vec<Value>
§row_count: usize
§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
§retryable: bool
§trace: Trace
§

DryRun

Fields

§params: Vec<String>
§session: Option<String>
§trace: Trace
§

Config(RuntimeConfig)

§

Pong

Fields

§

Close

Fields

§message: String
§

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.