pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub fn new(account: Account) -> Self
pub fn new(account: Account) -> Self
Examples found in repository?
examples/basic.rs (lines 17-21)
9async fn main() {
10 static USERNAME: &str = "fkwIzx6c"; //"gvwXYp4s";
11 static PASSWORD: &str = "AaVF95VBS9jHX3CU";
12 static SOURCE: &str = "46768108001"; //"4796223160";
13 static DESTINATION: &str = "+46760281011";
14 static PLATFORM_ID: &str = "COMMON_API";
15 static PLATFORM_PARTNER_ID: &str = "23142"; //"22753";
16
17 let client = Client::new(Account::new(
18 USERNAME,
19 PASSWORD,
20 "https://n-eu.linkmobility.io/",
21 ));
22 let response = SMS::with_text(
23 Address::new(SOURCE.to_string()),
24 Address::new(DESTINATION.to_string()),
25 PlatformID::new(PLATFORM_ID),
26 PlatformPartnerID::new(PLATFORM_PARTNER_ID),
27 "Sms via Link Mobility",
28 )
29 .send(&client)
30 .await
31 .expect("error");
32 println!("{response:?}");
33}Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Mutably borrows from an owned value. Read more