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§
Sourcefn 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 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.
Sourcefn 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,
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.