Skip to main content

remove_geo_bans

Function remove_geo_bans 

Source
pub async fn remove_geo_bans(
    client: &Client,
    value: &RecordValue,
    bans: &[GeoBan],
) -> Result<()>
Expand description

Removes bans of value, usually the result of select_geo_bans.

Each delete carries value’s uuid, and Core refuses a ban that belongs to another value. Not atomic: on an error midway the bans already removed stay removed.

§Errors

Any error of GeoBans::delete, e.g. ErrorCode::NotFound if a ban was removed meanwhile.

§Examples

use dinio_sdk::ops::{self, GeoBanSelector};

let bans = ops::select_geo_bans(value, &GeoBanSelector::All)?;
ops::remove_geo_bans(client, value, &bans).await?;