Skip to main content

RemoteObjectRecord

Enum RemoteObjectRecord 

Source
pub enum RemoteObjectRecord {
    CandidateCommit(CandidateCommitRecord),
    CandidateExclusive(CandidateObjectRecord),
    RetainedAuthority(RetainedAuthorityRecord),
    SharedLiveSet(SharedObjectRecord),
}

Variants§

§

CandidateCommit(CandidateCommitRecord)

§

CandidateExclusive(CandidateObjectRecord)

§

RetainedAuthority(RetainedAuthorityRecord)

§

SharedLiveSet(SharedObjectRecord)

Implementations§

Source§

impl RemoteObjectRecord

Source

pub fn prepared_owner_promotion_request_publication( publication: &RetainedOwnerPromotionRequestPublication, commit: &StoreBatchCommit, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn prepared_membership_head_acceptance( value: &MembershipHeadAcceptance, head: &AuthorHead, prepared: &PreparedExactObject, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_commit( identity: StoreBatchCommitRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_provider_access_grant( reference: StoreMemberProviderAccessGrantRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_device_join_abandonment( reference: DeviceJoinAbandonmentRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_device_registration( reference: StoreDeviceRegistrationRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_exclusive_merge_membership_entry( family: CandidateFamilyId, reference: MembershipEntryRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_exclusive_merge_membership_head( family: CandidateFamilyId, reference: MembershipHeadRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_reclaim_evidence( reference: ReclaimEvidenceRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_reclaim_authorization( reference: ReclaimAuthorizationRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_activated_reclaim_receipt( reference: ReclaimReceiptRef, canonical_signed_bytes: &[u8], stored_bytes: &[u8], owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn snapshot_activated_blob( stored: &StoredBlobRef, owner: SnapshotObjectOwner, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn snapshot_activated_image( image: &SnapshotImageRef, owner: SnapshotObjectOwner, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn snapshot_activated_membership_rollup( rollup: &MembershipRollupRef, owner: SnapshotObjectOwner, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

The membership rollup bound to one exact snapshot metadata candidate. Its metadata slot determines the artifact slot; another snapshot uses another object even when its rollup bytes are identical.

Source

pub fn activated_external_package( domain: SharedLiveSetObjectDomain, package: &AudiencePackage, owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn activated_blob( stored: &StoredBlobRef, owner: StoreBatchCommitRef, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source

pub fn candidate_owned_blob( stored: &StoredBlobRef, owner: StoreBatchCommitRef, uploaded_verified: bool, ) -> Result<ClosedRemoteObject, RemoteObjectRecordError>

Source§

impl RemoteObjectRecord

Source

pub fn validate(&self) -> Result<(), RemoteObjectRecordError>

Everything this record asserts about itself that does not need its payloads: where those payloads live, that the identity is the one the record is filed under, and that its ownership state holds together.

Byte agreement is Self::validate_payload’s job, and it is checked where bytes arrive from outside this device’s own durable state, rather than on every load. Identity and payload cannot drift apart afterwards: neither hash mutates across transitions, and the two domain changes that do happen re-wrap the same reference.

Source

pub fn validate_payload( &self, canonical_semantic_bytes: &[u8], ) -> Result<(), RemoteObjectRecordError>

Check this record’s identity against the plaintext it names — the whole domain parse, its signature verifications, and its agreement with the reference.

Called where bytes enter from somewhere this device does not already trust: a constructor handed the payload, a pull that parsed it off the wire. Reading back this device’s own durable state does not run it — neither loading the row nor reading the spool file the row names, which is named for the digest of its own contents and was fixed by this record’s identity when it was built.

Source

pub fn into_activated( self, commit: &StoreBatchCommitRef, ) -> Result<Self, RemoteObjectRecordError>

Source

pub fn into_observed_activated( self, commit: &StoreBatchCommitRef, ) -> Result<Self, RemoteObjectRecordError>

Source

pub fn records_verified_upload(&self) -> bool

Whether this device already created these exact bytes at the provider and settled the create.

The record is the evidence, so nothing that holds one needs to read the object back to know its content: the bytes were hashed locally before the upload and the provider’s exact-upload verification settled the create. Reading it back would test the provider’s durability, not this device’s correctness, and an object that later goes missing surfaces on the read that wants it.

Source

pub fn mark_uploaded_verified(&mut self) -> Result<(), RemoteObjectRecordError>

Source

pub fn add_retained_authority_candidate( &mut self, candidate: StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn merge_retained_authority_activation( &mut self, expected: &Self, owner: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn begin_candidate_nonactivation( &mut self, nonactivation: CandidateNonactivation, ) -> Result<Option<ProtocolInertObject>, RemoteObjectRecordError>

Source

pub fn cleanup_target(&self) -> Option<&ExactObjectRef>

Source

pub fn mark_absent_verified(&mut self) -> Result<(), RemoteObjectRecordError>

Source

pub fn candidate_cleanup_complete( &self, candidate: &StoreBatchCommitRef, ) -> Result<bool, RemoteObjectRecordError>

Source§

impl RemoteObjectRecord

Source

pub fn merge_blob_activation( &mut self, stored: &StoredBlobRef, owner: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn merge_package_activation( &mut self, domain: &SharedLiveSetObjectDomain, package: &AudiencePackage, owner: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn merge_retained_replay_owner( &mut self, owner: RetainedReplayOwner, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn remove_all_retained_replay_owners( &mut self, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn remove_retained_replay_owner( &mut self, owner: &RetainedReplayOwner, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn merge_snapshot_owner( &mut self, stored: &StoredBlobRef, owner: SnapshotObjectOwner, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn replace_snapshot_owners_for_image( &mut self, owner: Option<&SnapshotObjectOwner>, pending_store_snapshots: &BTreeSet<ObjectSlot>, ) -> Result<(), RemoteObjectRecordError>

Reassign inherited snapshot ownership in an exported database copy. Live records keep their owners through the merge methods instead.

Source

pub fn retire_superseded_store_snapshot_ownership( &mut self, metadata_slot: &ObjectSlot, superseded: &BTreeSet<ObjectSlot>, ) -> Result<(), RemoteObjectRecordError>

Retire superseded Store snapshot leases at an accepted successor. A reused object remains owned by that successor; a dropped blob retains its exact original publication provenance until physical reclaim.

Source§

impl RemoteObjectRecord

Source

pub fn release_pending_candidate( self, candidate: &StoreBatchCommitRef, ) -> Result<PendingCandidateRelease, RemoteObjectRecordError>

Remove a candidate’s pending claim without asserting whether that exact candidate was accepted. The caller must hold the durable operation’s completion or discard proof and select its exact manifest. This calculation neither changes the original row nor authorizes a new publication; the operation owns deletion and the final atomic row update.

Source§

impl RemoteObjectRecord

Source

pub fn object(&self) -> &ExactObjectRef

Source

pub fn payloads(&self) -> &RemoteObjectPayloads

Source

pub fn semantic_payload(&self) -> SemanticPayload<'_>

Where this record’s plaintext is. A stored blob carries its locator in the row, the image domains have no plaintext of their own, and every other domain names its plaintext in the spool by the identity’s semantic hash.

Source

pub fn stored_payload(&self) -> Option<ObjectHash>

The spooled ciphertext this record uploads, when the ciphertext is its own to upload.

Source

pub fn payload_claims(&self) -> BTreeSet<ObjectHash>

Every spool file this record names. The claim it holds while its row exists, and what the row’s deletion lets go of.

Source

pub fn object_id(&self) -> ObjectHash

Source

pub fn is_activated_stored_blob(&self) -> bool

Source

pub fn validate_reclaimable_store_package( &self, target: &StorePackageRef, activation: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn validate_reclaimable_circle_package( &self, target: &CirclePackageRef, activation: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

Source

pub fn store_package_is_retained_for_replay( &self, target: &StorePackageRef, activation: &StoreBatchCommitRef, ) -> Result<bool, RemoteObjectRecordError>

Source

pub fn circle_package_is_retained_for_replay( &self, target: &CirclePackageRef, activation: &StoreBatchCommitRef, ) -> Result<bool, RemoteObjectRecordError>

Source

pub fn validate_reclaimable_circle_bootstrap_image( &self, image: &SnapshotImageRef, activation: &StoreBatchCommitRef, ) -> Result<(), RemoteObjectRecordError>

A Circle bootstrap image is reclaimable when its single activating Store commit is its only surviving owner: no pending activation and exactly one activated owner. A bootstrap image accretes a per-activating-commit owner, so more than one means a live successor still references it.

Source

pub fn validate_reclaimable_snapshot_image( &self, image: &SnapshotImageRef, owner: &SnapshotObjectOwner, ) -> Result<(), RemoteObjectRecordError>

A snapshot image is reclaimable when the exact snapshot named by the claim is its only surviving owner, with no pending activation.

Source

pub fn validate_reclaimable_membership_rollup( &self, rollup: &MembershipRollupRef, owner: &SnapshotObjectOwner, ) -> Result<(), RemoteObjectRecordError>

A membership rollup is reclaimable when the exact snapshot named as its owner is its only owner. Another snapshot owner keeps the shared object live.

Source

pub fn validate_reclaimable_stored_blob( &self, stored: &StoredBlobRef, ) -> Result<(), RemoteObjectRecordError>

A stored blob is reclaimable when it is the exact activated blob the target names. Unlike a package or an image, a blob legitimately carries several activated owners — one per commit that bound it — so ownership count is not the eligibility question here; whether any live row or installable image still needs it is, and the reclaim verified that before reaching closure.

Source

pub fn stored_blob_commit_owners(&self) -> Vec<StoreBatchCommitRef>

The activated Store commits that published this stored blob. A blob accretes one per commit whose package bindings named it, so a republished blob carries several.

Source

pub fn snapshot_owners(&self) -> impl Iterator<Item = &SnapshotObjectOwner>

Source

pub fn retained_replay_owners( &self, ) -> impl Iterator<Item = &RetainedReplayOwner>

Trait Implementations§

Source§

impl Clone for RemoteObjectRecord

Source§

fn clone(&self) -> RemoteObjectRecord

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteObjectRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RemoteObjectRecord

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for RemoteObjectRecord

Source§

fn eq(&self, other: &RemoteObjectRecord) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RemoteObjectRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for RemoteObjectRecord

Source§

impl StructuralPartialEq for RemoteObjectRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,