pub struct BudgetedTransport<T> { /* private fields */ }Expand description
A blocking DLMS transport with a cumulative receive budget for each
BlockingReader GET. Wrap the transport before calling [Client::connect].
Charge each received APDU, including its headers and block-transfer exchanges. Only APDUs within the budget reach the upstream client. The transport can read one further APDU into the driver’s frame buffer to determine its length. Association setup and ordinary release take place outside the GET budget. Configure deadlines and lower-layer framing limits on the underlying transport.
Implementations§
Source§impl<T> BudgetedTransport<T>
impl<T> BudgetedTransport<T>
Sourcepub fn new(inner: T, max_response_bytes: NonZeroUsize) -> Self
pub fn new(inner: T, max_response_bytes: NonZeroUsize) -> Self
Set the maximum number of incoming APDU bytes per attribute GET.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Recover the underlying transport, for example after a successful release.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BudgetedTransport<T>where
T: Freeze,
impl<T> RefUnwindSafe for BudgetedTransport<T>where
T: RefUnwindSafe,
impl<T> Send for BudgetedTransport<T>where
T: Send,
impl<T> Sync for BudgetedTransport<T>where
T: Sync,
impl<T> Unpin for BudgetedTransport<T>where
T: Unpin,
impl<T> UnsafeUnpin for BudgetedTransport<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for BudgetedTransport<T>where
T: UnwindSafe,
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