pub struct DirectMessageConfig {
pub recipient_pubkey: PublicKey,
pub min_level: Option<Level>,
pub use_nip17: bool,
pub relays: Vec<String>,
}Expand description
Configuration for direct message alerts in tracing.
§Examples
use sentrystr_tracing::builder::DirectMessageConfig;
use sentrystr::Level;
use nostr::Keys;
let recipient = Keys::generate().public_key();
let relays = vec!["wss://relay.damus.io".to_string()];
let dm_config = DirectMessageConfig::new(recipient, relays)
.with_min_level(Level::Error)
.with_nip17(true);Fields§
§recipient_pubkey: PublicKey§min_level: Option<Level>§use_nip17: bool§relays: Vec<String>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for DirectMessageConfig
impl Freeze for DirectMessageConfig
impl RefUnwindSafe for DirectMessageConfig
impl Send for DirectMessageConfig
impl Sync for DirectMessageConfig
impl Unpin for DirectMessageConfig
impl UnsafeUnpin for DirectMessageConfig
impl UnwindSafe for DirectMessageConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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