Attempt

Trait Attempt 

Source
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§

Source

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.

Source

fn push_attempt(&mut self, attempt: u32)

Sets the header value at the key HEADER_ATTEMPT in this FieldTable to the given u32 value.

Source

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.

Implementations on Foreign Types§

Source§

impl Attempt for FieldTable

Source§

fn retrieve_attempt(&self) -> Option<u32>

Source§

fn push_attempt(&mut self, attempt: u32)

Source§

fn increment_attempt(&mut self)

Implementors§