pub struct ServerError(/* private fields */);Expand description
PostgreSQL server error/notice message.
Implementations§
Source§impl ServerError
impl ServerError
Sourcepub fn new(fields: HashMap<u8, String>) -> Self
pub fn new(fields: HashMap<u8, String>) -> Self
Create from a HashMap of field codes to values.
Sourcepub fn severity(&self) -> &str
pub fn severity(&self) -> &str
Severity (localized): ERROR, FATAL, PANIC, WARNING, NOTICE, DEBUG, INFO, LOG
Sourcepub fn severity_v(&self) -> &str
pub fn severity_v(&self) -> &str
Severity (non-localized, never translated)
Sourcepub fn internal_position(&self) -> Option<u32>
pub fn internal_position(&self) -> Option<u32>
Position in internal query
Sourcepub fn internal_query(&self) -> Option<&str>
pub fn internal_query(&self) -> Option<&str>
Failed internal command text
Sourcepub fn constraint(&self) -> Option<&str>
pub fn constraint(&self) -> Option<&str>
Constraint name
Trait Implementations§
Source§impl Clone for ServerError
impl Clone for ServerError
Source§fn clone(&self) -> ServerError
fn clone(&self) -> ServerError
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 Debug for ServerError
impl Debug for ServerError
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnwindSafe for ServerError
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