rusmppc 0.4.0

A Rust SMPP client.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use tokio::sync::oneshot;

use crate::error::Error;

#[derive(Debug)]
pub struct PendingResponses {
    pub ack: oneshot::Sender<Result<Vec<u32>, Error>>,
}

impl PendingResponses {
    pub fn new() -> (Self, oneshot::Receiver<Result<Vec<u32>, Error>>) {
        let (ack, rx) = oneshot::channel();

        (Self { ack }, rx)
    }
}