pub struct RawMessage<'a> {
pub type_byte: u8,
pub payload: &'a [u8],
}Expand description
Raw message from the PostgreSQL server.
This is a thin wrapper around the message type byte and payload. Individual message types are parsed on demand by state machines.
Fields§
§type_byte: u8Message type byte
payload: &'a [u8]Message payload (after length field)
Implementations§
Source§impl<'a> RawMessage<'a>
impl<'a> RawMessage<'a>
Sourcepub fn is_notification(&self) -> bool
pub fn is_notification(&self) -> bool
Check if this is a notification response.
Sourcepub fn is_parameter_status(&self) -> bool
pub fn is_parameter_status(&self) -> bool
Check if this is a parameter status message.
Sourcepub fn is_async_type(type_byte: u8) -> bool
pub fn is_async_type(type_byte: u8) -> bool
Check if a type byte represents an async message (can arrive at any time).
Trait Implementations§
Source§impl<'a> Clone for RawMessage<'a>
impl<'a> Clone for RawMessage<'a>
Source§fn clone(&self) -> RawMessage<'a>
fn clone(&self) -> RawMessage<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for RawMessage<'a>
impl<'a> Debug for RawMessage<'a>
impl<'a> Copy for RawMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for RawMessage<'a>
impl<'a> RefUnwindSafe for RawMessage<'a>
impl<'a> Send for RawMessage<'a>
impl<'a> Sync for RawMessage<'a>
impl<'a> Unpin for RawMessage<'a>
impl<'a> UnwindSafe for RawMessage<'a>
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