Skip to main content

keep

Function keep 

Source
pub fn keep(
    catalogue: &mut Catalogue,
    name: &str,
    statement: &str,
    declarations: &[String],
    max_rows: Option<usize>,
    policy: &Policy,
) -> Result<()>
Expand description

Keeps one statement under a name, after proving it admissible.

The statement is put through the same defences now rather than at the moment somebody runs it by name, because whoever runs it by name never sees its text and could not tell why it was refused.

ยงErrors

Returns the refusal the statement earned, a usage failure when a declaration is malformed, and a configuration failure when the catalogue cannot be written.