pub struct SQLNotice {
pub level: NoticeLevel,
pub sqlstate: String,
pub message: String,
pub detail: Option<String>,
pub hint: Option<String>,
}Expand description
A notice that a statement reports without failing, as PostgreSQL’s ereport sends one below ERROR: its level, SQLSTATE and primary message, and the detail and hint that clients receive as fields of their own.
Fields§
§level: NoticeLevel§sqlstate: String§message: String§detail: Option<String>§hint: Option<String>Implementations§
Source§impl SQLNotice
impl SQLNotice
Sourcepub fn new(level: NoticeLevel, message: impl Into<String>) -> Self
pub fn new(level: NoticeLevel, message: impl Into<String>) -> Self
A notice of level that carries the SQLSTATE PostgreSQL assigns a report that names none (see NoticeLevel::default_sqlstate).
Sourcepub fn with_sqlstate(self, sqlstate: impl Into<String>) -> Self
pub fn with_sqlstate(self, sqlstate: impl Into<String>) -> Self
The notice with the SQLSTATE its report names.
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
The notice with a detail.
Trait Implementations§
impl Eq for SQLNotice
impl StructuralPartialEq for SQLNotice
Auto Trait Implementations§
impl Freeze for SQLNotice
impl RefUnwindSafe for SQLNotice
impl Send for SQLNotice
impl Sync for SQLNotice
impl Unpin for SQLNotice
impl UnsafeUnpin for SQLNotice
impl UnwindSafe for SQLNotice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more