#[non_exhaustive]pub struct SendOptions {
pub message_id: Option<String>,
pub extra_stanza_nodes: Vec<Node>,
pub ephemeral_expiration: Option<u32>,
pub stanza_type_override: Option<StanzaType>,
pub group_metadata_freshness: Freshness,
pub device_freshness: Freshness,
}Expand description
Options for Client::send_message_with_options.
Start from SendOptions::default and chain the with_* setters; the
struct is #[non_exhaustive] so new knobs can be added without breaking
consumers.
let options = SendOptions::default().with_message_id("3EB0ABCDEF");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message_id: Option<String>Override the auto-generated message ID. Useful for resending a failed message with the same ID or idempotency.
extra_stanza_nodes: Vec<Node>Extra XML child nodes on the message stanza.
ephemeral_expiration: Option<u32>Ephemeral duration in seconds. Sets contextInfo.expiration on the
message (WA Web EProtoGenerator.js:183 parity).
Common values: 86400 (24h), 604800 (7d), 7776000 (90d).
stanza_type_override: Option<StanzaType>Force the <message type="..."> attribute instead of deriving it from
content. Escape hatch for a type the classifier can’t infer.
group_metadata_freshness: FreshnessFreshness policy for group metadata used by this send.
device_freshness: FreshnessFreshness policy for recipient device lists used by this send.
Implementations§
Source§impl SendOptions
impl SendOptions
Sourcepub fn with_message_id(self, message_id: impl Into<String>) -> Self
pub fn with_message_id(self, message_id: impl Into<String>) -> Self
Sourcepub fn with_extra_stanza_nodes(self, nodes: Vec<Node>) -> Self
pub fn with_extra_stanza_nodes(self, nodes: Vec<Node>) -> Self
Sourcepub fn with_ephemeral_expiration(self, seconds: u32) -> Self
pub fn with_ephemeral_expiration(self, seconds: u32) -> Self
Sourcepub fn with_stanza_type_override(self, stanza_type: StanzaType) -> Self
pub fn with_stanza_type_override(self, stanza_type: StanzaType) -> Self
Sourcepub fn with_group_metadata_freshness(self, freshness: Freshness) -> Self
pub fn with_group_metadata_freshness(self, freshness: Freshness) -> Self
Sourcepub fn with_device_freshness(self, freshness: Freshness) -> Self
pub fn with_device_freshness(self, freshness: Freshness) -> Self
Trait Implementations§
Source§impl Clone for SendOptions
impl Clone for SendOptions
Source§fn clone(&self) -> SendOptions
fn clone(&self) -> SendOptions
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 SendOptions
impl Debug for SendOptions
Source§impl Default for SendOptions
impl Default for SendOptions
Source§fn default() -> SendOptions
fn default() -> SendOptions
Auto Trait Implementations§
impl Freeze for SendOptions
impl RefUnwindSafe for SendOptions
impl Send for SendOptions
impl Sync for SendOptions
impl Unpin for SendOptions
impl UnsafeUnpin for SendOptions
impl UnwindSafe for SendOptions
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more