pub struct PolicyMessage {
pub id: String,
pub npub: String,
pub channel_id: String,
pub at_ms: u64,
pub text: String,
pub mentions: u32,
}Expand description
One message as the policy engine reads it: the identity, author, channel and text a rule needs to cite what it convicted on.
Fields§
§id: StringThe inner rumor id, hex — a chunk-set wire event carries many messages, so only this names one.
npub: String§channel_id: StringChannel eid hex, so an exempt channel can be excluded by id.
at_ms: u64Milliseconds: the engine clamps and orders on inner time.
text: String§mentions: u32p-tags on the message — the only thing that counts as a mention.
Trait Implementations§
Source§impl Clone for PolicyMessage
impl Clone for PolicyMessage
Source§fn clone(&self) -> PolicyMessage
fn clone(&self) -> PolicyMessage
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 PolicyMessage
impl RefUnwindSafe for PolicyMessage
impl Send for PolicyMessage
impl Sync for PolicyMessage
impl Unpin for PolicyMessage
impl UnsafeUnpin for PolicyMessage
impl UnwindSafe for PolicyMessage
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