StructMeta

Trait StructMeta 

Source
pub trait StructMeta:
    Copy
    + Clone
    + Debug {
    type Struct<'a>: Copy + Clone + Debug;

    const FIELDS: StructFields;
    const FIELD_COUNT: usize = _;
    const IS_FIXED_SIZE: bool = _;
    const FIXED_SIZE: Option<usize> = _;
    const LENGTH_FIELD_INDEX: Option<usize> = _;
    const HAS_LENGTH_FIELD: bool = _;

    // Required methods
    fn new(buf: &[u8]) -> Result<Self::Struct<'_>, ParseError>;
    fn to_vec(&self) -> Vec<u8> ;
}
Expand description

A trait for structs that describes their fields, containing some associated constants. Note that only FIELDS is provided. The remainder of the associated constants are computed from FIELDS.

Required Associated Constants§

Provided Associated Constants§

Required Associated Types§

Required Methods§

Source

fn new(buf: &[u8]) -> Result<Self::Struct<'_>, ParseError>

Source

fn to_vec(&self) -> Vec<u8>

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.

Implementors§

Source§

impl<'a> StructMeta for AuthenticationCleartextPassword<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationGSS<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = AuthenticationGSS<'__struct>

Source§

impl<'a> StructMeta for AuthenticationGSSContinue<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationKerberosV5<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationMD5Password<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationMessage<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationOk<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = AuthenticationOk<'__struct>

Source§

impl<'a> StructMeta for AuthenticationSASL<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationSASLContinue<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationSASLFinal<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationSCMCredential<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for AuthenticationSSPI<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for BackendKeyData<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = BackendKeyData<'__struct>

Source§

impl<'a> StructMeta for Bind<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Bind<'__struct>

Source§

impl<'a> StructMeta for BindComplete<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = BindComplete<'__struct>

Source§

impl<'a> StructMeta for CancelRequest<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CancelRequest<'__struct>

Source§

impl<'a> StructMeta for Close<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Close<'__struct>

Source§

impl<'a> StructMeta for CloseComplete<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CloseComplete<'__struct>

Source§

impl<'a> StructMeta for CommandComplete<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CommandComplete<'__struct>

Source§

impl<'a> StructMeta for CopyBothResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyBothResponse<'__struct>

Source§

impl<'a> StructMeta for CopyData<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyData<'__struct>

Source§

impl<'a> StructMeta for CopyDone<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyDone<'__struct>

Source§

impl<'a> StructMeta for CopyFail<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyFail<'__struct>

Source§

impl<'a> StructMeta for CopyInResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyInResponse<'__struct>

Source§

impl<'a> StructMeta for CopyOutResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = CopyOutResponse<'__struct>

Source§

impl<'a> StructMeta for DataRow<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = DataRow<'__struct>

Source§

impl<'a> StructMeta for Describe<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Describe<'__struct>

Source§

impl<'a> StructMeta for EmptyQueryResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for ErrorField<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = ErrorField<'__struct>

Source§

impl<'a> StructMeta for ErrorResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = ErrorResponse<'__struct>

Source§

impl<'a> StructMeta for Execute<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Execute<'__struct>

Source§

impl<'a> StructMeta for Flush<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Flush<'__struct>

Source§

impl<'a> StructMeta for FunctionCall<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = FunctionCall<'__struct>

Source§

impl<'a> StructMeta for FunctionCallResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for GSSENCRequest<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = GSSENCRequest<'__struct>

Source§

impl<'a> StructMeta for GSSResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = GSSResponse<'__struct>

Source§

impl<'a> StructMeta for InitialMessage<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = InitialMessage<'__struct>

Source§

impl<'a> StructMeta for Message<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Message<'__struct>

Source§

impl<'a> StructMeta for NegotiateProtocolVersion<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for NoData<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = NoData<'__struct>

Source§

impl<'a> StructMeta for NoticeField<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = NoticeField<'__struct>

Source§

impl<'a> StructMeta for NoticeResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = NoticeResponse<'__struct>

Source§

impl<'a> StructMeta for NotificationResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for ParameterDescription<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for ParameterStatus<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = ParameterStatus<'__struct>

Source§

impl<'a> StructMeta for Parse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Parse<'__struct>

Source§

impl<'a> StructMeta for ParseComplete<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = ParseComplete<'__struct>

Source§

impl<'a> StructMeta for PasswordMessage<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = PasswordMessage<'__struct>

Source§

impl<'a> StructMeta for PortalSuspended<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = PortalSuspended<'__struct>

Source§

impl<'a> StructMeta for Query<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Query<'__struct>

Source§

impl<'a> StructMeta for ReadyForQuery<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = ReadyForQuery<'__struct>

Source§

impl<'a> StructMeta for RowDescription<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = RowDescription<'__struct>

Source§

impl<'a> StructMeta for RowField<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = RowField<'__struct>

Source§

impl<'a> StructMeta for SASLInitialResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

impl<'a> StructMeta for SASLResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = SASLResponse<'__struct>

Source§

impl<'a> StructMeta for SSLRequest<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = SSLRequest<'__struct>

Source§

impl<'a> StructMeta for SSLResponse<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = SSLResponse<'__struct>

Source§

impl<'a> StructMeta for StartupMessage<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = StartupMessage<'__struct>

Source§

impl<'a> StructMeta for StartupNameValue<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = StartupNameValue<'__struct>

Source§

impl<'a> StructMeta for Sync<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Sync<'__struct>

Source§

impl<'a> StructMeta for Terminate<'a>

Implements a trait containing the fields of the struct, allowing us to compute some useful things.

Source§

const FIELDS: StructFields

Source§

type Struct<'__struct> = Terminate<'__struct>