pub trait DeviceStore: Send + Sync {
// Required methods
fn enroll_device<'life0, 'async_trait>(
&'life0 self,
record: DeviceRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn link_device_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
user_sub: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_device<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn touch_device<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn revoke_device<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Storage operations for anonymous device records.
Required Methods§
Sourcefn enroll_device<'life0, 'async_trait>(
&'life0 self,
record: DeviceRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enroll_device<'life0, 'async_trait>(
&'life0 self,
record: DeviceRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upsert a device record. On conflict (same fingerprint), updates enrolled_at
but preserves any existing user_sub and label.
Sourcefn link_device_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
user_sub: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn link_device_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
user_sub: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Associate a user subject with an existing device record.
Sourcefn get_device<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_device<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a device record by fingerprint.