1use async_trait::async_trait;
2
3use crate::client::OciClient;
4use crate::error::Result;
5use crate::r#ref::OciRef;
6use crate::traits::OciPromoter;
7
8pub struct DefaultOciPromoter {
9 client: OciClient,
10}
11
12impl DefaultOciPromoter {
13 pub fn new(client: OciClient) -> Self {
14 Self { client }
15 }
16}
17
18#[async_trait]
19impl OciPromoter for DefaultOciPromoter {
20 async fn promote(&self, source: &OciRef, target: &OciRef, force: bool) -> Result<()> {
21 self.client.promote(source, target, force).await.map(|_| ())
22 }
23}