pub async fn delete(&mut self) -> Result<()> {
        match self.id.clone() {
            Some(tail_id) => match http::cf_v4_api_client_async(&self.user)?
                .request(&DeleteTail {
                    account_identifier: &self.account_id,
                    script_name: &self.script_name,
                    tail_id: &tail_id,
                })
                .await
            {
                Ok(_) | Err(ApiFailure::Error(StatusCode::NOT_FOUND, _)) => {
                    log::info!("Deleted tail: {}", &tail_id);
                    self.id = None;
                    self.url = None;
                    self.expires_at = Instant::now();
                    Ok(())
                }
                Err(err) => {
                    anyhow::bail!("Failed to delete tail: {}", http::format_error(err, None))
                }
            },
            _ => Ok(()),
        }
    }
/// Deletes the tail and unattaches it from the Worker.
Deletes the tail and unattaches it from the Worker.
Deletes the tail and unattaches it from the Worker .
pub async fn delete(&mut self) -> Result<()> {
        match self.id.clone() {
            Some(tail_id) => match http::cf_v4_api_client_async(&self.user)?
                .request(&DeleteTail {
                    account_identifier: &self.account_id,
                    script_name: &self.script_name,
                    tail_id: &tail_id,
                })
                .await
            {
                Ok(_) | Err(ApiFailure::Error(StatusCode::NOT_FOUND, _)) => {
                    log::info!("Deleted tail: {}", &tail_id);
                    self.id = None;
                    self.url = None;
                    self.expires_at = Instant::now();
                    Ok(())
                }
                Err(err) => {
                    anyhow::bail!("Failed to delete tail: {}", http::format_error(err, None))
                }
            },
            _ => Ok(()),
        }
    }
pub async fn delete ( & mut self ) -> Result < ( ) > { match self . id . clone ( ) { Some ( tail_id ) => match http :: cf_v4_api_client_async ( & self . user ) ? . request ( & DeleteTail { account_identifier : & self . account_id , script_name : & self . script_name , tail_id : & tail_id , } ) . await { Ok ( _ ) | Err ( ApiFailure :: Error ( StatusCode :: NOT_FOUND , _ ) ) => { log :: info ! ( " " tail_id ) ; self . id = None ; self . url = None ; self . expires_at = Instant :: now ( ) ; Ok ( ( ) ) } Err ( err ) => { anyhow :: bail ! ( " " http format_error ( err None ) ) } } , _ => Ok ( ( ) ) , } }
Deletes the tail and unattaches it from the Worker.
Deletes the tail and unattaches it from the Worker .
&mut self
&mut self