pub struct Status<'a> { /* private fields */ }Expand description
High-level API for WhatsApp status/story updates.
Implementations§
Source§impl<'a> Status<'a>
impl<'a> Status<'a>
Sourcepub async fn send_text(
&self,
text: &str,
background_argb: u32,
font: i32,
recipients: Vec<Jid>,
options: StatusSendOptions,
) -> Result<String, Error>
pub async fn send_text( &self, text: &str, background_argb: u32, font: i32, recipients: Vec<Jid>, options: StatusSendOptions, ) -> Result<String, Error>
Send a text status update to the given recipients.
background_argb is the background color as 0xAARRGGBB (e.g., 0xFF1E6E4F).
font is the font style index (0-4 on WhatsApp Web).
Sourcepub async fn send_image(
&self,
upload: &UploadResponse,
thumbnail: Vec<u8>,
caption: Option<&str>,
recipients: Vec<Jid>,
options: StatusSendOptions,
) -> Result<String, Error>
pub async fn send_image( &self, upload: &UploadResponse, thumbnail: Vec<u8>, caption: Option<&str>, recipients: Vec<Jid>, options: StatusSendOptions, ) -> Result<String, Error>
Send an image status update.
The caller must upload the media first via client.upload() and provide
the UploadResponse, JPEG thumbnail bytes, and optional caption.
Sourcepub async fn send_video(
&self,
upload: &UploadResponse,
thumbnail: Vec<u8>,
duration_seconds: u32,
caption: Option<&str>,
recipients: Vec<Jid>,
options: StatusSendOptions,
) -> Result<String, Error>
pub async fn send_video( &self, upload: &UploadResponse, thumbnail: Vec<u8>, duration_seconds: u32, caption: Option<&str>, recipients: Vec<Jid>, options: StatusSendOptions, ) -> Result<String, Error>
Send a video status update.
The caller must upload the media first via client.upload() and provide
the UploadResponse, JPEG thumbnail bytes, duration in seconds, and optional caption.
Sourcepub async fn send_raw(
&self,
message: Message,
recipients: Vec<Jid>,
options: StatusSendOptions,
) -> Result<String, Error>
pub async fn send_raw( &self, message: Message, recipients: Vec<Jid>, options: StatusSendOptions, ) -> Result<String, Error>
Send a raw wa::Message as a status update.
Use this for message types not covered by the convenience methods above.
Sourcepub async fn revoke(
&self,
message_id: impl Into<String>,
recipients: Vec<Jid>,
options: StatusSendOptions,
) -> Result<String, Error>
pub async fn revoke( &self, message_id: impl Into<String>, recipients: Vec<Jid>, options: StatusSendOptions, ) -> Result<String, Error>
Delete (revoke) a previously sent status update.
recipients should be the same list used when posting the status,
since the revoke must be encrypted to the same set of devices.
Auto Trait Implementations§
impl<'a> Freeze for Status<'a>
impl<'a> !RefUnwindSafe for Status<'a>
impl<'a> Send for Status<'a>
impl<'a> Sync for Status<'a>
impl<'a> Unpin for Status<'a>
impl<'a> UnsafeUnpin for Status<'a>
impl<'a> !UnwindSafe for Status<'a>
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> 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
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