pub(crate) enum ListLength {
NonZeroU8 {
empty_error: InvalidMessage,
},
U16,
NonZeroU16 {
empty_error: InvalidMessage,
},
U24 {
max: usize,
error: InvalidMessage,
},
}
Expand description
The length of the length prefix for a list.
The types that appear in lists are limited to three kinds of length prefixes:
1, 2, and 3 bytes. For the latter kind, we require a TlsListElement
implementer
to specify a maximum length and error if the actual length is larger.
Variants§
NonZeroU8
U8 but non-empty
Fields
§
empty_error: InvalidMessage
U16
U16, perhaps empty
NonZeroU16
U16 but non-empty
Fields
§
empty_error: InvalidMessage
U24
U24 with imposed upper bound
Implementations§
Source§impl ListLength
impl ListLength
Auto Trait Implementations§
impl Freeze for ListLength
impl RefUnwindSafe for ListLength
impl Send for ListLength
impl Sync for ListLength
impl Unpin for ListLength
impl UnwindSafe for ListLength
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