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::PublicKey;
let recipient = PublicKey::from_bech32("npub1...")?;
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§
Source§impl Clone for DirectMessageConfig
impl Clone for DirectMessageConfig
Source§fn clone(&self) -> DirectMessageConfig
fn clone(&self) -> DirectMessageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DirectMessageConfig
impl RefUnwindSafe for DirectMessageConfig
impl Send for DirectMessageConfig
impl Sync for DirectMessageConfig
impl Unpin 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,
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