[−][src]Struct dangerous::error::RetryRequirement
An indicator of how many bytes are required to continue processing input.
Although the value allows you to estimate how much more input you need till you can continue processing the input, it is a very granular value and may result in a lot of wasted reprocessing of input if not handled correctly.
Implementations
impl RetryRequirement
[src]
#[must_use]pub fn new(value: usize) -> Option<Self>
[src]
Create a new RetryRequirement
.
If the provided value is 0
, this signifies processing can't be
retried. If the provided value is greater than 0
, this signifies the
amount of additional input bytes required to continue processing.
#[must_use]pub fn from_had_and_needed(had: usize, needed: usize) -> Option<Self>
[src]
Create a retry requirement from a count of how many bytes we had and how many we needed.
#[must_use]pub fn continue_after(self) -> usize
[src]
An indicator of how many bytes are required to continue processing input, if applicable.
Although the value allows you to estimate how much more input you need till you can continue processing the input, it is a very granular value and may result in a lot of wasted reprocessing of input if not handled correctly.
#[must_use]pub fn continue_after_non_zero(self) -> NonZeroUsize
[src]
Returns a NonZeroUsize
wrapped variant of continue_after
.
Trait Implementations
impl Clone for RetryRequirement
[src]
pub fn clone(&self) -> RetryRequirement
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for RetryRequirement
[src]
impl Debug for RetryRequirement
[src]
impl Display for RetryRequirement
[src]
impl DisplayBase for RetryRequirement
[src]
impl Eq for RetryRequirement
[src]
impl NoInteriorMut for RetryRequirement
[src]
impl PartialEq<RetryRequirement> for RetryRequirement
[src]
pub fn eq(&self, other: &RetryRequirement) -> bool
[src]
pub fn ne(&self, other: &RetryRequirement) -> bool
[src]
impl StructuralEq for RetryRequirement
[src]
impl StructuralPartialEq for RetryRequirement
[src]
impl ToRetryRequirement for RetryRequirement
[src]
pub fn to_retry_requirement(&self) -> Option<RetryRequirement>
[src]
pub fn is_fatal(&self) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for RetryRequirement
[src]
impl Send for RetryRequirement
[src]
impl Sync for RetryRequirement
[src]
impl Unpin for RetryRequirement
[src]
impl UnwindSafe for RetryRequirement
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Guarded for T where
T: NoInteriorMut,
[src]
T: NoInteriorMut,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,