#[non_exhaustive]pub struct Notice { /* private fields */ }Expand description
A notice (non-fatal warning) sent by the PostgreSQL server.
Wraps a PgServerError which contains all fields from the PostgreSQL
NoticeResponse message. Convenience accessor methods are provided for
the most commonly used fields.
Implementations§
Source§impl Notice
impl Notice
Sourcepub fn from_fields(fields: &NoticeResponseBody) -> Result<Self>
pub fn from_fields(fields: &NoticeResponseBody) -> Result<Self>
Parse a Notice from a NoticeResponseBody.
Sourcepub fn severity(&self) -> &str
pub fn severity(&self) -> &str
Returns the severity level.
One of: ERROR, FATAL, PANIC, WARNING, NOTICE, DEBUG, INFO, LOG.
Sourcepub fn as_server_error(&self) -> &PgServerError
pub fn as_server_error(&self) -> &PgServerError
Returns a reference to the underlying PgServerError.
Use this to access all fields (position, schema, table, column, constraint, etc.) that are not exposed by the convenience methods.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Notice
impl RefUnwindSafe for Notice
impl Send for Notice
impl Sync for Notice
impl Unpin for Notice
impl UnsafeUnpin for Notice
impl UnwindSafe for Notice
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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