pub struct RumorContext {
pub sender: PublicKey,
pub is_mine: bool,
pub conversation_id: String,
pub conversation_type: ConversationType,
}Expand description
Context for processing a rumor
Provides the necessary context to process a rumor correctly, including who sent it and what conversation it belongs to.
Fields§
§sender: PublicKeyThe sender’s public key
is_mine: boolWhether this rumor is from ourselves
conversation_id: StringThe conversation ID (npub for DMs)
conversation_type: ConversationTypeThe type of conversation
Implementations§
Source§impl RumorContext
impl RumorContext
The author npub to stamp on a parsed message. A DM is 1:1 so the author is implied by the
chat (None); a Community message records its real author so the group can attribute it.
Trait Implementations§
Source§impl Clone for RumorContext
impl Clone for RumorContext
Source§fn clone(&self) -> RumorContext
fn clone(&self) -> RumorContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RumorContext
impl RefUnwindSafe for RumorContext
impl Send for RumorContext
impl Sync for RumorContext
impl Unpin for RumorContext
impl UnsafeUnpin for RumorContext
impl UnwindSafe for RumorContext
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