pub async fn atomic_mutate(
        &self,
        mutations: Vec<RegistryMutation>,
        pre_conditions: Vec<Precondition>,
    ) -> Result<u64, Vec<Error>> {
        let payload = serialize_atomic_mutate_request(mutations, pre_conditions);
        let nonce = format!("{}", chrono::Utc::now().timestamp_nanos())
            .as_bytes()
            .to_vec();
        match self
            .choose_random_agent()
            .execute_update(&self.canister_id, "atomic_mutate", payload, nonce)
            .await
        {
            Ok(result) => match result {
                Some(response) => deserialize_atomic_mutate_response(response),
                None => Err(vec![ic_registry_transport::Error::UnknownError(
                    "No response was received from registry_atomic_mutate.".to_string(),
                )]),
            },
            Err(error_string) => Err(vec![ic_registry_transport::Error::UnknownError(format!(
                "Error on registry_atomic_mutate: {}",
                error_string
            ))]),
        }
    }
/// Applies 'mutations' to the registry.
Applies 'mutations' to the registry.
Applies ' mutations ' to the registry .
pub async fn atomic_mutate(
        &self,
        mutations: Vec<RegistryMutation>,
        pre_conditions: Vec<Precondition>,
    ) -> Result<u64, Vec<Error>> {
        let payload = serialize_atomic_mutate_request(mutations, pre_conditions);
        let nonce = format!("{}", chrono::Utc::now().timestamp_nanos())
            .as_bytes()
            .to_vec();
        match self
            .choose_random_agent()
            .execute_update(&self.canister_id, "atomic_mutate", payload, nonce)
            .await
        {
            Ok(result) => match result {
                Some(response) => deserialize_atomic_mutate_response(response),
                None => Err(vec![ic_registry_transport::Error::UnknownError(
                    "No response was received from registry_atomic_mutate.".to_string(),
                )]),
            },
            Err(error_string) => Err(vec![ic_registry_transport::Error::UnknownError(format!(
                "Error on registry_atomic_mutate: {}",
                error_string
            ))]),
        }
    }
pub async fn atomic_mutate ( & self , mutations : Vec < RegistryMutation > , pre_conditions : Vec < Precondition > , ) -> Result < u64 , Vec < Error > > { let payload = serialize_atomic_mutate_request ( mutations , pre_conditions ) ; let nonce = format ! ( " " chrono Utc now ( ) timestamp_nanos ( ) ) . as_bytes ( ) . to_vec ( ) ; match self . choose_random_agent ( ) . execute_update ( & self . canister_id , " " , payload , nonce ) . await { Ok ( result ) => match result { Some ( response ) => deserialize_atomic_mutate_response ( response ) , None => Err ( vec ! [ ic_registry_transport Error UnknownError ( " " to_string ( ) ) ] ) , } , Err ( error_string ) => Err ( vec ! [ ic_registry_transport Error UnknownError ( format ( " " error_string ) ) ] ) , } }
Applies 'mutations' to the registry.
Applies ' mutations ' to the registry .
&self
mutations
Vec<RegistryMutation>
pre_conditions
Vec<Precondition>
&self
mutations
Vec<RegistryMutation>
pre_conditions
Vec<Precondition>