pub trait ExternalBackup: Send + Debug {
// Required methods
fn store(&self, key: String, value: String);
fn load(&self, key: String) -> Option<String>;
fn clear(&self, key: String);
fn clear_all(&self);
fn should_apply_stored_client_id(&self) -> bool;
}Expand description
Embedders may optionally supply an object that implements this interface to provide external backup storage for Glean internal data.
Required Methods§
Sourcefn load(&self, key: String) -> Option<String>
fn load(&self, key: String) -> Option<String>
Retrieve the most recent value stored for key.
Returns nothing if there is no value.
Sourcefn should_apply_stored_client_id(&self) -> bool
fn should_apply_stored_client_id(&self) -> bool
TEMPORARY ONLY FOR A LITTLE WHILE Should we actually use the value for the client_id we asked for ( if there even is one )?
Trait Implementations§
Source§impl<UT> LiftRef<UT> for Box<dyn ExternalBackup>
impl<UT> LiftRef<UT> for Box<dyn ExternalBackup>
type LiftType = Box<dyn ExternalBackup>
Source§impl<UT> LiftReturn<UT> for Box<dyn ExternalBackup>
impl<UT> LiftReturn<UT> for Box<dyn ExternalBackup>
Source§type ReturnType = <Box<dyn ExternalBackup> as Lift<UT>>::FfiType
type ReturnType = <Box<dyn ExternalBackup> as Lift<UT>>::FfiType
FFI return type for trait interfaces
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Lift a successfully returned value from a trait interface
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Lift a foreign returned value from a trait interface Read more
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Lift a Rust value for a callback interface method error result Read more
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Lift a Rust value for an unexpected callback interface error Read more