pub struct DurableInterfaceStore { /* private fields */ }Expand description
Filesystem-backed content-addressed store for interface artifacts.
Implementations§
Source§impl DurableInterfaceStore
impl DurableInterfaceStore
Sourcepub fn verify_manifest(
&self,
manifest: &DistributedInterfaceManifest,
limits: CertificateLimits,
) -> Result<RelativeInterfaceCertificate, DistributedInterfaceError>
pub fn verify_manifest( &self, manifest: &DistributedInterfaceManifest, limits: CertificateLimits, ) -> Result<RelativeInterfaceCertificate, DistributedInterfaceError>
Recompute every fold and verify a committed manifest from stored shards.
Ignores durable progress. Checks that every recorded fold and the final result follow from the ordered shard artifacts.
Source§impl DurableInterfaceStore
impl DurableInterfaceStore
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self, DistributedInterfaceError>
pub fn open(path: impl AsRef<Path>) -> Result<Self, DistributedInterfaceError>
Open or create a store rooted at path.
Sourcepub fn put(
&self,
bytes: &[u8],
) -> Result<(ArtifactId, bool), DistributedInterfaceError>
pub fn put( &self, bytes: &[u8], ) -> Result<(ArtifactId, bool), DistributedInterfaceError>
Store exact bytes and return their content identifier.
Sourcepub fn get(
&self,
id: ArtifactId,
maximum_bytes: usize,
) -> Result<Vec<u8>, DistributedInterfaceError>
pub fn get( &self, id: ArtifactId, maximum_bytes: usize, ) -> Result<Vec<u8>, DistributedInterfaceError>
Read an object and check its identifier.
Sourcepub fn contains(&self, id: ArtifactId) -> bool
pub fn contains(&self, id: ArtifactId) -> bool
Whether an object path exists. This does not read or verify the bytes.
Sourcepub fn commit(
&self,
shard_artifacts: &[Vec<u8>],
separator_vertices: &[usize],
output_protected_vertices: &[usize],
limits: CertificateLimits,
) -> Result<DistributedInterfaceCommit, DistributedInterfaceError>
pub fn commit( &self, shard_artifacts: &[Vec<u8>], separator_vertices: &[usize], output_protected_vertices: &[usize], limits: CertificateLimits, ) -> Result<DistributedInterfaceCommit, DistributedInterfaceError>
Compose shard artifacts and publish one atomic manifest.
Shards are ordered. Every intermediate fold protects the union of
separator_vertices and output_protected_vertices. A retry resumes
from the last durable fold for the same content-bound job.
Sourcepub fn commit_stored(
&self,
shard_ids: &[ArtifactId],
separator_vertices: &[usize],
output_protected_vertices: &[usize],
limits: CertificateLimits,
) -> Result<DistributedInterfaceCommit, DistributedInterfaceError>
pub fn commit_stored( &self, shard_ids: &[ArtifactId], separator_vertices: &[usize], output_protected_vertices: &[usize], limits: CertificateLimits, ) -> Result<DistributedInterfaceCommit, DistributedInterfaceError>
Compose shards already present in this store.
The coordinator loads at most one shard and one accumulator artifact for each fold. The identifiers are ordered and bind the job.
Sourcepub fn manifest(
&self,
job: ArtifactId,
maximum_bytes: usize,
) -> Result<DistributedInterfaceManifest, DistributedInterfaceError>
pub fn manifest( &self, job: ArtifactId, maximum_bytes: usize, ) -> Result<DistributedInterfaceManifest, DistributedInterfaceError>
Read a committed manifest by job identifier.
Trait Implementations§
Source§impl Clone for DurableInterfaceStore
impl Clone for DurableInterfaceStore
Source§fn clone(&self) -> DurableInterfaceStore
fn clone(&self) -> DurableInterfaceStore
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 DurableInterfaceStore
impl RefUnwindSafe for DurableInterfaceStore
impl Send for DurableInterfaceStore
impl Sync for DurableInterfaceStore
impl Unpin for DurableInterfaceStore
impl UnsafeUnpin for DurableInterfaceStore
impl UnwindSafe for DurableInterfaceStore
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,
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