Struct atat::ClientBuilder
source · [−]pub struct ClientBuilder<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> where
Tx: Write<u8>,
T: Timer<TIMER_HZ>,
D: Digester, { /* private fields */ }
Expand description
Builder to set up a Client
and IngressManager
pair.
Create a new builder through the new
method.
Implementations
sourceimpl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
T: Timer<TIMER_HZ>,
D: Digester,
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
T: Timer<TIMER_HZ>,
D: Digester,
sourcepub fn new(serial_tx: Tx, timer: T, digester: D, config: Config) -> Self
pub fn new(serial_tx: Tx, timer: T, digester: D, config: Config) -> Self
Create a builder for new Atat client instance.
The serial_tx
type must implement the embedded_hal
serial::Write<u8>
trait while the timer must implement
the fugit_timer::Timer
trait.
sourcepub fn build(
self,
queues: Queues<RES_CAPACITY, URC_CAPACITY>
) -> (Client<Tx, T, TIMER_HZ, RES_CAPACITY, URC_CAPACITY>, IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY>)
pub fn build(
self,
queues: Queues<RES_CAPACITY, URC_CAPACITY>
) -> (Client<Tx, T, TIMER_HZ, RES_CAPACITY, URC_CAPACITY>, IngressManager<D, BUF_LEN, RES_CAPACITY, URC_CAPACITY>)
Set up and return a Client
and IngressManager
pair.
Auto Trait Implementations
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> RefUnwindSafe for ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: RefUnwindSafe,
T: RefUnwindSafe,
Tx: RefUnwindSafe,
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Send for ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Send,
T: Send,
Tx: Send,
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Sync for ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Sync,
T: Sync,
Tx: Sync,
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Unpin for ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: Unpin,
T: Unpin,
Tx: Unpin,
impl<Tx, T, D, const TIMER_HZ: u32, const BUF_LEN: usize, const RES_CAPACITY: usize, const URC_CAPACITY: usize> UnwindSafe for ClientBuilder<Tx, T, D, TIMER_HZ, BUF_LEN, RES_CAPACITY, URC_CAPACITY> where
D: UnwindSafe,
T: UnwindSafe,
Tx: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more