xbp-oci 10.46.0

OCI registry primitives and traits for XBP deploy.
Documentation
use async_trait::async_trait;

use crate::client::OciClient;
use crate::error::Result;
use crate::r#ref::OciRef;
use crate::traits::OciPromoter;

pub struct DefaultOciPromoter {
    client: OciClient,
}

impl DefaultOciPromoter {
    pub fn new(client: OciClient) -> Self {
        Self { client }
    }
}

#[async_trait]
impl OciPromoter for DefaultOciPromoter {
    async fn promote(&self, source: &OciRef, target: &OciRef, force: bool) -> Result<()> {
        self.client.promote(source, target, force).await.map(|_| ())
    }
}