pub struct ExpectedConnectionLength { /* private fields */ }
Expand description
Define an expected connection length range
There is no minimum. The maximum is bounded by what is representable as a u16 at T = N * 0.625 ms, so max = 65535 * 0.625 ms = 40.959375 seconds.
Implementations§
Source§impl ExpectedConnectionLength
impl ExpectedConnectionLength
Sourcepub fn new(
min: Duration,
max: Duration,
) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
pub fn new( min: Duration, max: Duration, ) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
Sourcepub fn copy_into_slice(&self, bytes: &mut [u8])
pub fn copy_into_slice(&self, bytes: &mut [u8])
Serializes the expected connection length range into the given byte buffer.
§Panics
The buffer must be at least 4 bytes long.
Trait Implementations§
Source§impl Clone for ExpectedConnectionLength
impl Clone for ExpectedConnectionLength
Source§fn clone(&self) -> ExpectedConnectionLength
fn clone(&self) -> ExpectedConnectionLength
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ExpectedConnectionLength
impl RefUnwindSafe for ExpectedConnectionLength
impl Send for ExpectedConnectionLength
impl Sync for ExpectedConnectionLength
impl Unpin for ExpectedConnectionLength
impl UnwindSafe for ExpectedConnectionLength
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