Skip to main content

ProfileSyncHandler

Trait ProfileSyncHandler 

Source
pub trait ProfileSyncHandler: Send + Sync {
    // Provided method
    fn on_profile_fetched(
        &self,
        _slim: &SlimProfile,
        _avatar_url: &str,
        _banner_url: &str,
    ) { ... }
}
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§

Source

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).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§