Skip to main content

reason_of

Function reason_of 

Source
pub fn reason_of(reason: Option<&str>) -> Result<String, BodyRefusal>
Expand description

The reason a mutating request carries, refused when it carries none.

One rule for every mutating operation, whether it asks something of the machine or writes a record: a change nobody gave a reason for is one the history cannot account for afterwards, and the answer to it is the same refusal whichever operation it arrived at.

ยงErrors

Returns BodyRefusal when the reason is absent or is nothing but whitespace.