pub struct NotificationFilter { /* private fields */ }
Expand description
Defines which notifications the server should send to the client.
The filter contains two parts:
minimum_severity
: Request the server to only send notifications of this severity or higher.disabled_classifications
/disabled_categories
: Request the server to not send notifications of these categories/classifications. “categories” is the legacy name for “classifications”. Otherwise, they’re the same thing. They’re both tracked together. I.e., changing one will change the other.
See DriverConfig::with_notification_filter()
, SessionConfig::with_notification_filter()
,
and ExecuteQueryBuilder::with_notification_filter()
.
Implementations§
Source§impl NotificationFilter
impl NotificationFilter
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new NotificationFilter
with default values.
This is equivalent to Default::default()
:
- leave it up to the server to choose a
minimum_severity
. - leave it up to the server to choose
disabled_categories
/disabled_classifications
.
Sourcepub fn new_disable_all() -> Self
pub fn new_disable_all() -> Self
Create a new NotificationFilter
which requests the server to not send any notifications.
Sourcepub fn with_minimum_severity(self, minimum_severity: MinimumSeverity) -> Self
pub fn with_minimum_severity(self, minimum_severity: MinimumSeverity) -> Self
Request the server to only send notifications of this severity or higher.
Sourcepub fn with_default_minimum_severity(self) -> Self
pub fn with_default_minimum_severity(self) -> Self
Leave it up to the server to choose a minimum_severity
.
See also with_minimum_severity()
.
Sourcepub fn with_disabled_classifications(
self,
disabled_classifications: Vec<DisabledClassification>,
) -> Self
pub fn with_disabled_classifications( self, disabled_classifications: Vec<DisabledClassification>, ) -> Self
Request the server to not send notifications of these classifications.
Sourcepub fn with_disabled_categories(
self,
disabled_categories: Vec<DisabledCategory>,
) -> Self
pub fn with_disabled_categories( self, disabled_categories: Vec<DisabledCategory>, ) -> Self
Request the server to not send notifications of these classifications.
This is the same as
with_disabled_classifications()
.
Sourcepub fn with_default_disabled_classifications(self) -> Self
pub fn with_default_disabled_classifications(self) -> Self
Leave it up to the server to choose which classifications to disable.
Sourcepub fn with_default_disabled_categories(self) -> Self
pub fn with_default_disabled_categories(self) -> Self
Leave it up to the server to choose which categories to disable.
This is the same as
with_default_disabled_classifications()
.
Trait Implementations§
Source§impl Clone for NotificationFilter
impl Clone for NotificationFilter
Source§fn clone(&self) -> NotificationFilter
fn clone(&self) -> NotificationFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NotificationFilter
impl Debug for NotificationFilter
Source§impl Default for NotificationFilter
impl Default for NotificationFilter
Source§fn default() -> NotificationFilter
fn default() -> NotificationFilter
Source§impl PartialEq for NotificationFilter
impl PartialEq for NotificationFilter
impl Eq for NotificationFilter
impl StructuralPartialEq for NotificationFilter
Auto Trait Implementations§
impl Freeze for NotificationFilter
impl RefUnwindSafe for NotificationFilter
impl Send for NotificationFilter
impl Sync for NotificationFilter
impl Unpin for NotificationFilter
impl UnwindSafe for NotificationFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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