Trait Decode

Source
pub trait Decode<'de, Context = ()>
where Self: Sized,
{ // Required method fn decode_with(buf: Bytes, context: Context) -> Result<Self, Error>; // Provided method fn decode(buf: Bytes) -> Result<Self, Error> where Self: Decode<'de, ()> { ... } }

Required Methods§

Source

fn decode_with(buf: Bytes, context: Context) -> Result<Self, Error>

Provided Methods§

Source

fn decode(buf: Bytes) -> Result<Self, Error>
where Self: Decode<'de, ()>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Decode<'_> for ()

Source§

impl Decode<'_> for Bytes

Source§

fn decode_with(buf: Bytes, _: ()) -> Result<Self, Error>

Implementors§

Source§

impl Decode<'_> for Authentication

Available on crate feature postgres only.
Source§

impl Decode<'_> for BackendKeyData

Available on crate feature postgres only.
Source§

impl Decode<'_> for CommandComplete

Available on crate feature postgres only.
Source§

impl Decode<'_> for CopyData<Bytes>

Available on crate feature postgres only.
Source§

impl Decode<'_> for CopyDone

Available on crate feature postgres only.
Source§

impl Decode<'_> for CopyFail

Available on crate feature postgres only.
Source§

impl Decode<'_> for CopyResponse

Available on crate feature postgres only.
Source§

impl Decode<'_> for DataRow

Available on crate feature postgres only.
Source§

impl Decode<'_> for Notice

Available on crate feature postgres only.
Source§

impl Decode<'_> for Notification

Available on crate feature postgres only.
Source§

impl Decode<'_> for ParameterDescription

Available on crate feature postgres only.
Source§

impl Decode<'_> for ParameterStatus

Available on crate feature postgres only.
Source§

impl Decode<'_> for ReadyForQuery

Available on crate feature postgres only.
Source§

impl Decode<'_> for RowDescription

Available on crate feature postgres only.