pub struct ObjectFetch {
pub data: Vec<u8>,
pub committed: bool,
}Expand description
The bytes of an object fetched by CID, paired with their commit provenance so callers can decide whether persistence is safe.
committed == true means the bytes are already durable in the local
validated store (the in-memory cache or the blob plane) or were
self-verified against the CID and committed during this fetch — safe
for the caller to treat as validated.
committed == false means the bytes were returned by a remote
provider under a CID that cannot self-verify them (e.g. an XET Merkle
CID, which addresses the reconstruction DAG rather than the raw file).
The service deliberately does NOT commit such bytes (it cannot prove
they match the CID); the caller MUST validate them end-to-end (e.g.
pointer size + SHA-256) before persisting or treating them as
committed. Conflating this case with committed == true lets
unvalidated provider bytes leak past a caller’s persistence gate.
Fields§
§data: Vec<u8>The fetched object bytes.
committed: boolWhether the bytes are committed to the local validated store.
Trait Implementations§
Source§impl Clone for ObjectFetch
impl Clone for ObjectFetch
Source§fn clone(&self) -> ObjectFetch
fn clone(&self) -> ObjectFetch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectFetch
impl RefUnwindSafe for ObjectFetch
impl Send for ObjectFetch
impl Sync for ObjectFetch
impl Unpin for ObjectFetch
impl UnsafeUnpin for ObjectFetch
impl UnwindSafe for ObjectFetch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more