pub struct DispatchToChannelRequest {
pub dispatch_id: String,
pub org_id: String,
pub user_id: String,
pub channel: i32,
pub template_id: String,
pub template_vars: HashMap<String, String>,
pub locale: String,
pub region_constraint: Option<String>,
}Expand description
Worker-mode entry point invoked by the Temporal worker for one recipient.
Idempotent on dispatch_id: if a (dispatch_id, SENT) row already exists
in channel_dispatches, the worker SHALL return DISPATCH_STATUS_DEDUPED
without re-invoking the channel adapter.
Fields§
§dispatch_id: StringIdempotency key. Must be stable across retries from pidgr-api side.
org_id: String§user_id: String§channel: i32Which channel adapter to invoke (EMAIL is the Wave 1 implementation).
template_id: StringTemplate to render before dispatch.
template_vars: HashMap<String, String>Per-recipient template variables.
locale: StringBCP-47 locale used to select the template translation.
region_constraint: Option<String>Optional AWS region the worker MUST dispatch from (typically copied from the recipient’s reachability row). Unset means “no constraint.”
Implementations§
Source§impl DispatchToChannelRequest
impl DispatchToChannelRequest
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 region_constraint(&self) -> &str
pub fn region_constraint(&self) -> &str
Returns the value of region_constraint, or the default value if region_constraint is unset.
Trait Implementations§
Source§impl Clone for DispatchToChannelRequest
impl Clone for DispatchToChannelRequest
Source§fn clone(&self) -> DispatchToChannelRequest
fn clone(&self) -> DispatchToChannelRequest
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 DispatchToChannelRequest
impl Debug for DispatchToChannelRequest
Source§impl Default for DispatchToChannelRequest
impl Default for DispatchToChannelRequest
Source§impl Message for DispatchToChannelRequest
impl Message for DispatchToChannelRequest
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 DispatchToChannelRequest
impl PartialEq for DispatchToChannelRequest
Source§fn eq(&self, other: &DispatchToChannelRequest) -> bool
fn eq(&self, other: &DispatchToChannelRequest) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DispatchToChannelRequest
Auto Trait Implementations§
impl Freeze for DispatchToChannelRequest
impl RefUnwindSafe for DispatchToChannelRequest
impl Send for DispatchToChannelRequest
impl Sync for DispatchToChannelRequest
impl Unpin for DispatchToChannelRequest
impl UnsafeUnpin for DispatchToChannelRequest
impl UnwindSafe for DispatchToChannelRequest
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<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