Skip to main content

apply

Function apply 

Source
pub async fn apply(
    gated: &Gated,
    conn: &mut Conn,
    policy: &Policy,
    write_state: &mut WriteState,
    server_read_only: bool,
) -> Result<ChangeOutcome>
Expand description

Puts one change through every ceiling that guards it, then applies it.

The order is the design: refuse outright, then confirm, then ask the destination whether it accepts a change at all, then the restriction, then the key, then the scale. Only the last two cost a round trip, and they are asked last so every refusal that costs nothing comes first.

ยงErrors

Returns the first refusal any of those layers produced, or the mapped driver failure when the change itself was refused by the server.