Skip to main content

Bridge

Trait Bridge 

Source
pub trait Bridge {
    // Required methods
    fn get_opt_out<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<OptOutPreference, BridgeError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_opt_out<'life0, 'async_trait>(
        &'life0 mut self,
        value: OptOutPreference,
    ) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Interface to read/write the persistent storage for an OptOutPreference.

Required Methods§

Source

fn get_opt_out<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<OptOutPreference, BridgeError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the current persisted opt-out preference.

Defaults to OptOutPreference::AllowAllUpdates if no preference is set.

Source

fn set_opt_out<'life0, 'async_trait>( &'life0 mut self, value: OptOutPreference, ) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sets the persisted opt-out preference to value, or returns the error encountered while attempting to do so.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§