pub struct ChannelEvent {
pub org_id: String,
pub campaign_id: String,
pub recipient_user_id: String,
pub channel: i32,
pub step_kind: i32,
pub status: i32,
pub skip_reason: i32,
pub provider_message_id: String,
pub cost_micros: i64,
pub metadata_json: String,
pub occurred_at: Option<Timestamp>,
}Expand description
A single channel dispatch event for the audit trail. Append-only; the receiver enforces idempotency on terminal states via a partial unique index on (campaign_id, recipient_user_id, channel, step_kind).
Fields§
§org_id: String§campaign_id: String§recipient_user_id: String§channel: i32§step_kind: i32§status: i32§skip_reason: i32Set only when status = SKIPPED. UNSPECIFIED in all other cases.
provider_message_id: StringProvider’s identifier for this dispatch. Empty for SKIPPED events.
cost_micros: i64Cost in micros (1/1000000 of a USD). Zero for absorbed channels. Negative is invalid.
metadata_json: StringFree-form provider error payload on FAILED. JSON-encoded; opaque to the platform.
occurred_at: Option<Timestamp>Implementations§
Source§impl ChannelEvent
impl ChannelEvent
Sourcepub fn channel(&self) -> ChannelName
pub fn channel(&self) -> ChannelName
Returns the enum value of channel, or the default if the field is set to an invalid enum value.
Sourcepub fn set_channel(&mut self, value: ChannelName)
pub fn set_channel(&mut self, value: ChannelName)
Sets channel to the provided enum value.
Sourcepub fn step_kind(&self) -> ChannelStepKind
pub fn step_kind(&self) -> ChannelStepKind
Returns the enum value of step_kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_step_kind(&mut self, value: ChannelStepKind)
pub fn set_step_kind(&mut self, value: ChannelStepKind)
Sets step_kind to the provided enum value.
Sourcepub fn status(&self) -> ChannelEventStatus
pub fn status(&self) -> ChannelEventStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: ChannelEventStatus)
pub fn set_status(&mut self, value: ChannelEventStatus)
Sets status to the provided enum value.
Sourcepub fn skip_reason(&self) -> ChannelSkipReason
pub fn skip_reason(&self) -> ChannelSkipReason
Returns the enum value of skip_reason, or the default if the field is set to an invalid enum value.
Sourcepub fn set_skip_reason(&mut self, value: ChannelSkipReason)
pub fn set_skip_reason(&mut self, value: ChannelSkipReason)
Sets skip_reason to the provided enum value.
Trait Implementations§
Source§impl Clone for ChannelEvent
impl Clone for ChannelEvent
Source§fn clone(&self) -> ChannelEvent
fn clone(&self) -> ChannelEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelEvent
impl Debug for ChannelEvent
Source§impl Default for ChannelEvent
impl Default for ChannelEvent
impl Eq for ChannelEvent
Source§impl Hash for ChannelEvent
impl Hash for ChannelEvent
Source§impl Message for ChannelEvent
impl Message for ChannelEvent
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for ChannelEvent
impl PartialEq for ChannelEvent
impl StructuralPartialEq for ChannelEvent
Auto Trait Implementations§
impl Freeze for ChannelEvent
impl RefUnwindSafe for ChannelEvent
impl Send for ChannelEvent
impl Sync for ChannelEvent
impl Unpin for ChannelEvent
impl UnsafeUnpin for ChannelEvent
impl UnwindSafe for ChannelEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request