pub async fn fetch(
http: &Client,
plc_directory: &str,
uri: &AtUri,
) -> Result<(Publication, Vec<Entry>)>Expand description
Read a publication and its documents through the hardened anonymous client.
Deliberately thin. Everything that makes this fetch safe already exists
in crate::atproto and is reused rather than rebuilt:
crate::atproto::resolve_did_to_pdsrunscrate::net::assert_public_targeton theserviceEndpoint, which is a stranger’s string;- every read goes through
crate::net::guarded_get_no_privacy, re-vetting per hop and pinning the connection, which closes the rebinding window and supplies theUser-Agentthat 4 of 19 measured endpoints demand; crate::net::read_cappedbounds each response;crate::atproto::PdsClient::list_all_recordsbounds the page count AND detects a repeated or absent cursor — the trap this module’s first draft walked into, already solved there;- an XRPC error envelope surfaces as [
crate::atproto::XrpcError] rather than deserialising into an empty page.
The first draft of this module reimplemented all of that, worse. The only logic left here is the part that is genuinely about standard.site.