Skip to main content

Module profile

Module profile 

Source
Expand description

Profile types and sync — compact internal representation + relay fetching.

The id field is a u16 interner handle — the canonical npub string lives in NpubInterner (single source of truth). Use SlimProfile at serialization boundaries (frontend, DB).

The sync submodule has the priority queue, background processor, and load_profile relay fetch logic.

Re-exports§

pub use sync::SyncPriority;
pub use sync::ProfileSyncHandler;
pub use sync::NoOpProfileSyncHandler;

Modules§

sync
Profile sync — priority queue, background processor, and relay fetching.

Structs§

CachedImage
A profile picture held on disk: the URL it was fetched from and the file holding it.
Profile
Internal profile: a u16 interner handle, flags, and every string in one packed block.
ProfileFlags
SlimProfile
Profile with npub string instead of interner handle. Used for:
Status

Constants§

STREAM_CONSENT_KEY
Kind-0 content key by which a user consents to being shown on someone’s stream.

Functions§

metadata_stream_consent
Whether a kind-0’s content opts in to streams: true or the string "true".
with_stream_consent
meta with the consent key set when on, and absent otherwise.