pub trait ProfileSyncHandler: Send + Sync {
// Provided methods
fn on_profile_fetched(
&self,
_slim: &SlimProfile,
_avatar_url: &str,
_banner_url: &str,
) { ... }
fn forget_images(&self, _images: Vec<CachedImage>) { ... }
}Expand description
Callback trait for platform-specific profile sync work.
The core load_profile handles relay fetching, STATE updates, and
EventEmitter notifications. This trait covers what differs per platform:
- DB persistence (SQLite upsert)
- Image caching (avatar/banner download + disk cache)
Provided Methods§
Sourcefn on_profile_fetched(
&self,
_slim: &SlimProfile,
_avatar_url: &str,
_banner_url: &str,
)
fn on_profile_fetched( &self, _slim: &SlimProfile, _avatar_url: &str, _banner_url: &str, )
Called after a profile is fetched from relays and updated in STATE.
slim is ready for DB persistence. avatar_url/banner_url are
for image caching (may be empty).
Sourcefn forget_images(&self, _images: Vec<CachedImage>)
fn forget_images(&self, _images: Vec<CachedImage>)
Delete a blocked profile’s cached pictures from disk. No other profile points at them.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".