Crates.io | rust-aws-sns |
lib.rs | rust-aws-sns |
version | 0.4.0 |
source | src |
created_at | 2021-02-01 07:39:22.083621 |
updated_at | 2021-02-01 08:08:12.834696 |
description | Package sms provides a small wrapper around AWS SNS to make SMS usage more friendly. |
homepage | |
repository | https://github.com/SachinMaharana/rust-aws-sns |
max_upload_size | |
id | 349170 |
size | 41,947 |
crate rust-aws-sns provides a small wrapper around AWS SNS to make SMS usage more friendly.
use rust_aws_sns::{SmsType, SMS};
#[tokio::main]
async fn main() {
let s = SMS {
// ..Default::default() can also pass default values
sms_type: SmsType::Transactional,
sender_id: "".into(),
max_price: 0.01,
};
let res = s.send("hello".into(), "91xxxxxx153x".into()).await;
match res {
Ok(r) => println!("{:?}", r),
Err(e) => println!("{}", e),
}
}
Licence MIT