Skip to main content

StorageAdapter

Trait StorageAdapter 

Source
pub trait StorageAdapter: Send + Sync {
    // Required methods
    fn load<'life0, 'async_trait>(
        &'life0 self,
        profile: String,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prepare_write<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn save<'life0, 'async_trait>(
        &'life0 self,
        profile: String,
        token: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove<'life0, 'async_trait>(
        &'life0 self,
        profile: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn acquire_lock<'life0, 'async_trait>(
        &'life0 self,
        profile: String,
        timeout_millis: u64,
    ) -> Pin<Box<dyn Future<Output = Result<String, DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn release_lock<'life0, 'async_trait>(
        &'life0 self,
        lease: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> String;
}

Required Methods§

Source

fn load<'life0, 'async_trait>( &'life0 self, profile: String, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn prepare_write<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn save<'life0, 'async_trait>( &'life0 self, profile: String, token: String, ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn remove<'life0, 'async_trait>( &'life0 self, profile: String, ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn acquire_lock<'life0, 'async_trait>( &'life0 self, profile: String, timeout_millis: u64, ) -> Pin<Box<dyn Future<Output = Result<String, DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn release_lock<'life0, 'async_trait>( &'life0 self, lease: String, ) -> Pin<Box<dyn Future<Output = Result<(), DatabricksAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn name(&self) -> String

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn StorageAdapter

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = Handle

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(handle: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn StorageAdapter

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§