pub enum Event<'a> {
Show 16 variants
UpgradeTls,
ScramNeeded {
plus: bool,
},
Connected,
ParameterStatus {
name: &'a str,
value: &'a str,
},
Fields {
token: Token,
fields: Fields<'a>,
},
Row {
token: Token,
row: Row<'a>,
},
CommandComplete {
token: Token,
tag: &'a str,
row_count: Option<u64>,
},
Error {
token: Option<Token>,
error: ServerError<'a>,
},
Notice(ServerError<'a>),
Notification {
process_id: i32,
channel: &'a str,
payload: &'a str,
},
CopyIn {
token: Token,
binary: bool,
column_formats: &'a [u8],
},
CopyOut {
token: Token,
binary: bool,
column_formats: &'a [u8],
},
CopyData {
token: Token,
data: &'a [u8],
},
CopyDone {
token: Token,
},
Completed {
token: Token,
outcome: Outcome,
transaction: TransactionStatus,
},
Closed {
reason: Error,
},
}Variants§
UpgradeTls
ScramNeeded
Build upstream ScramSha256 outside the core (its constructor reads entropy)
from Connection::config().password, then call start_scram.
Connected
ParameterStatus
Fields
Row
CommandComplete
Error
Notice(ServerError<'a>)
Notification
CopyIn
CopyOut
CopyData
CopyDone
Completed
Closed
Implementations§
Source§impl Event<'_>
impl Event<'_>
Sourcepub fn into_owned(self) -> OwnedEvent
pub fn into_owned(self) -> OwnedEvent
Copy the event out of the connection’s buffer. Only borrowed payloads allocate: each string, byte slice, row, field list or diagnostic once.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Event<'a>
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> UnwindSafe for Event<'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