pub struct Alert { /* private fields */ }
Implementations§
source§impl Alert
impl Alert
pub fn builder() -> AlertBuilder
pub fn title(&self) -> &Option<String>
pub fn dedup_key(&self) -> &Option<String>
pub fn get_field(&self, name: impl AsRef<str>) -> Option<&Value>
pub fn get_fields(&self) -> &Value
sourcepub fn with_field(
self,
field_name: impl AsRef<str>,
field_value: impl Serialize
) -> Self
pub fn with_field( self, field_name: impl AsRef<str>, field_value: impl Serialize ) -> Self
Consumes this alert, sets a field on it and returns a new alert with the set field
sourcepub fn with_field_if_missing(
self,
field_name: impl AsRef<str>,
field_value: impl Serialize
) -> Self
pub fn with_field_if_missing( self, field_name: impl AsRef<str>, field_value: impl Serialize ) -> Self
Consumes this alert, sets a field on it if it does not exist already and returns a new alert with the set field
Trait Implementations§
source§impl From<AlertBuilder> for Alert
impl From<AlertBuilder> for Alert
source§fn from(builder: AlertBuilder) -> Self
fn from(builder: AlertBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Alert
impl RefUnwindSafe for Alert
impl Send for Alert
impl Sync for Alert
impl Unpin for Alert
impl UnwindSafe for Alert
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