pub struct BlobFetchParams {
pub ticket: String,
pub dest_path: String,
pub from: Vec<String>,
}Expand description
Params of Request::BlobFetch: the mcpmesh/blob/1 ticket and the LOCAL export path.
Fields§
§ticket: String§dest_path: String§from: Vec<String>ADDITIONAL sources to try if the ticket’s publisher does not answer (#83).
api_minor >= 47.
Content addressing makes every recipient a potential source, and without this the control API made that unusable: a ticket names ONE address, so a file shared with a room became unfetchable the moment the sender closed their laptop — even though other people in the room already held the identical, verified bytes.
Each entry is a stable principal (eid: device, b64u: user_id) or a paired nickname —
the same vocabulary open_session takes. They are preferred in order, after the ticket’s
own address, so the publisher stays the first choice and a live one costs nothing —
alternates are not dialled at all when it answers.
Since 0.49.1 the dials are hedged: an alternate starts about a second after a source has
failed to answer, rather than after that source’s full dial timeout. A source unreachable at
the head of the list therefore costs about a second, not twenty, and a long from list is no
longer a long wait. Each source is still dialled at most once.
An alternate only works if it can serve you. The bytes are BLAKE3-verified against the ticket’s hash whoever supplies them, so a hostile alternate cannot substitute content — but it must have republished the hash into a scope that grants you, or it answers with a permission refusal and the fetch moves on. Every failure mode falls through, not only an unreachable dial: a refusal, a missing hash, a mid-stream reset, and a stalled transfer all move to the next source.
Additive: absent from an older caller’s payload and read as empty, which is the
single-source behaviour.
Capped at MAX_BLOB_SOURCES; more is an error rather than a silent truncation.
Trait Implementations§
Source§impl Clone for BlobFetchParams
impl Clone for BlobFetchParams
Source§fn clone(&self) -> BlobFetchParams
fn clone(&self) -> BlobFetchParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more