Examples on this page target source snapshot
86b1b31, not a crates.io release. Use the current API guide to select the matching dependency.Choose a route
client.pictures().lookup(ProfilePictureRequest) replaces single-picture lookups on contacts and groups. Select Contact, Group or Community explicitly; the client does not perform an automatic community fallback.
Preview when you need the smaller picture. Use Community for a community parent; its route differs from a normal group’s route.
Revalidate a cached picture
Build the request with.existing_id(Some(cached_id)) only when you have the corresponding cached bytes. Unchanged carries no fresh URL and does not prove that your cache still has those bytes. Omit the existing ID to obtain a fresh result when local bytes are missing.
into_found() deliberately drops every non-found state. Use a match when your cache or UI must distinguish unchanged, missing and unauthorized results.
Preserve errors
A server 429 remainsContactError::Iq(IqError::ServerError { .. }) with its original stanza and optional backoff. It is not a ProfilePictureLookup::RateOverlimit result. Do not turn it into a missing picture or immediately retry without considering the rejection.
Request builders also accept optional timeout, common-group context, invite and persona ID. Only supported fields are sent on the selected route. Contact privacy-token discovery remains part of contact lookup.
Mutations and batches
Set/remove pictures throughprofile() or groups() as documented by their facade. groups().get_profile_pictures remains a separate batch API with per-entry outcomes; it is not a loop over this facade. See groups.