twilio-rs
twilio-rs copied to clipboard
Make `message` module public and format code
Thank you for creating such a wonderful crate!
I would like to discuss the MessageStatus
. Currently, message.rs
is not public, making it inaccessible for external use, which prevents handling through the enum.
This is how I would like to use it:
let twilio_message = client
.send_message(OutboundMessage::new(¶m.twilio.from_us, ¶m.tel, ¶m.content))
.await?;
match twilio_message.status {
Some(twilio::message::MessageStatus::Queued) => {
println!("Message is queued!");
Ok(())
},
Some(status) => {
println!("Message status: {:?}", status);
Ok(())
},
None => {
Err(Error::App("Failed to get message status.".to_string()))
}
}
If possible, I would appreciate it if you could make message.rs
public.