#[non_exhaustive]pub struct Startup {
pub protocol_number_major: u16,
pub protocol_number_minor: u16,
pub parameters: BTreeMap<String, String>,
}Expand description
Postgresql wire protocol startup message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.protocol_number_major: u16§protocol_number_minor: u16§parameters: BTreeMap<String, String>Implementations§
Source§impl Startup
impl Startup
Sourcepub const PROTOCOL_VERSION_3_0: i32 = 196608
pub const PROTOCOL_VERSION_3_0: i32 = 196608
Protocol version 3.0
Sourcepub const PROTOCOL_VERSION_3_2: i32 = 196610
pub const PROTOCOL_VERSION_3_2: i32 = 196610
Protocol version 3.2
Sourcepub const PG_PROTOCOL_EARLIEST: u16 = 3
pub const PG_PROTOCOL_EARLIEST: u16 = 3
Earliest supported major protocol version
Sourcepub const PG_PROTOCOL_LATEST: u16 = 3
pub const PG_PROTOCOL_LATEST: u16 = 3
Latest supported major protocol version
Trait Implementations§
impl Eq for Startup
Source§impl Message for Startup
impl Message for Startup
Source§fn message_length(&self) -> usize
fn message_length(&self) -> usize
Return the length of the message, including the length integer itself.
Source§fn max_message_length() -> usize
fn max_message_length() -> usize
Return the max length of message in this type. Read more
Source§fn encode_body(&self, buf: &mut BytesMut) -> PgWireResult<()>
fn encode_body(&self, buf: &mut BytesMut) -> PgWireResult<()>
Encode body part of the message.
Source§fn decode(buf: &mut BytesMut, ctx: &DecodeContext) -> PgWireResult<Option<Self>>
fn decode(buf: &mut BytesMut, ctx: &DecodeContext) -> PgWireResult<Option<Self>>
Default implementation for decoding message. Read more
Source§fn decode_body(
buf: &mut BytesMut,
msg_len: usize,
_ctx: &DecodeContext,
) -> PgWireResult<Self>
fn decode_body( buf: &mut BytesMut, msg_len: usize, _ctx: &DecodeContext, ) -> PgWireResult<Self>
Decode body part of the message.
Source§fn message_type() -> Option<u8>
fn message_type() -> Option<u8>
Return the type code of the message. In order to maintain backward
compatibility,
Startup has no message type.impl StructuralPartialEq for Startup
Auto Trait Implementations§
impl Freeze for Startup
impl RefUnwindSafe for Startup
impl Send for Startup
impl Sync for Startup
impl Unpin for Startup
impl UnsafeUnpin for Startup
impl UnwindSafe for Startup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more