pub trait Attempt {
// Required methods
fn retrieve_attempt(&self) -> Option<u32>;
fn push_attempt(&mut self, attempt: u32);
fn increment_attempt(&mut self);
}Expand description
Artificial trait implemented for FieldTable to allow convenient handling
of the header HEADER_ATTEMPT that carries the processing attempt number.
Required Methods§
Sourcefn retrieve_attempt(&self) -> Option<u32>
fn retrieve_attempt(&self) -> Option<u32>
Extracts the header value at the key HEADER_ATTEMPT in this
FieldTable, if it can be inferred as a valid u32.
This method does not do any logical inference: e.g., if no attempt value
is present, None is promptly returned.
Sourcefn push_attempt(&mut self, attempt: u32)
fn push_attempt(&mut self, attempt: u32)
Sets the header value at the key HEADER_ATTEMPT in this
FieldTable to the given u32 value.
Sourcefn increment_attempt(&mut self)
fn increment_attempt(&mut self)
Increments the existing header value at the key HEADER_ATTEMPT in
this FieldTable by one. If no value exists at that key, sets the new
value to one.