#[non_exhaustive]pub enum LengthPolicy {
DefiniteOnly,
AllowIndefinite,
}Expand description
Received indefinite-length policy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DefiniteOnly
Reject all indefinite-length items.
AllowIndefinite
Accept well-formed indefinite containers and chunked strings.
Trait Implementations§
Source§impl Clone for LengthPolicy
impl Clone for LengthPolicy
Source§fn clone(&self) -> LengthPolicy
fn clone(&self) -> LengthPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LengthPolicy
Source§impl Debug for LengthPolicy
impl Debug for LengthPolicy
impl Eq for LengthPolicy
Source§impl PartialEq for LengthPolicy
impl PartialEq for LengthPolicy
impl StructuralPartialEq for LengthPolicy
Auto Trait Implementations§
impl Forget for LengthPolicy
impl Freeze for LengthPolicy
impl Move for LengthPolicy
impl RefUnwindSafe for LengthPolicy
impl Send for LengthPolicy
impl Sync for LengthPolicy
impl Unpin for LengthPolicy
impl UnsafeUnpin for LengthPolicy
impl UnwindSafe for LengthPolicy
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