pub struct BlobStream { /* private fields */ }Expand description
One opened blob, ready to serve ranges. Held by a host that is streaming or seeking a blob (playback probing a codec header, then a tail, then decoding forward) rather than loading it whole.
A range costs the bytes it returns, from either source, but for different reasons:
- Local (an external file, the local store, or a cache copy) — the stream holds the open file and every range is one positioned read of it. No hashing: a local file’s current bytes are the answer to a read of it, and a blob’s bytes are checked against the hash its row declares at publication, which is where they become canonical synced content.
- Remote, uncached — the stream fetches only the sealed chunks covering the range and opens them. A chunk that opens is authentic: the provider holds no key and cannot forge a tag, and the tag covers the chunk’s bytes, its index, and the header framing the blob. So verification is per chunk, which is what lets a range cost a range rather than the object.
Holding the local descriptor is a property, not an optimization: a path can be replaced between two reads, a descriptor cannot, so the stream keeps serving the file it opened even if that file is later evicted, renamed, or replaced. An in-place rewrite of that same file does reach the stream — that is a file the user owns and edits; coven’s own copies are published by rename or hard link and never written in place.
Implementations§
Source§impl BlobStream
impl BlobStream
Sourcepub fn plaintext_size(&self) -> u64
pub fn plaintext_size(&self) -> u64
The blob’s whole plaintext length. Every range must lie inside it.
Auto Trait Implementations§
impl !Freeze for BlobStream
impl !RefUnwindSafe for BlobStream
impl Send for BlobStream
impl Sync for BlobStream
impl Unpin for BlobStream
impl UnsafeUnpin for BlobStream
impl !UnwindSafe for BlobStream
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
§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