pub struct GitSnapshotObjectGraphV1 {
pub schema_version: u32,
pub archive_blob: GitSha1ObjectId,
pub descriptor_blob: GitSha1ObjectId,
pub goal3_tree: GitSha1ObjectId,
pub rustferry_tree: GitSha1ObjectId,
pub root_tree: GitSha1ObjectId,
pub commit: GitSha1ObjectId,
}Expand description
Complete identity of the two blobs, three nested trees, and parentless commit.
Fields§
§schema_version: u32Graph schema version; currently 1.
archive_blob: GitSha1ObjectIdExact source.zip blob.
descriptor_blob: GitSha1ObjectIdExact source.json blob.
goal3_tree: GitSha1ObjectIdLeaf tree containing source.json and source.zip.
rustferry_tree: GitSha1ObjectIdIntermediate tree containing only the goal3 tree.
root_tree: GitSha1ObjectIdRoot tree containing only the .rustferry tree.
commit: GitSha1ObjectIdExact parentless snapshot commit.
Implementations§
Source§impl GitSnapshotObjectGraphV1
impl GitSnapshotObjectGraphV1
Sourcepub fn validate(&self) -> Result<(), GitSnapshotError>
pub fn validate(&self) -> Result<(), GitSnapshotError>
Require the supported graph schema.
§Errors
Returns GitSnapshotError::InvalidStage for an unsupported graph schema.
Sourcepub fn verify_rehashed<E>(
&self,
archive_blob: GitSha1ObjectId,
descriptor_blob: GitSha1ObjectId,
operation_id: &str,
created_at_ms: u64,
hash_object: impl FnMut(GitSnapshotObjectKind, &[u8]) -> Result<GitSha1ObjectId, E>,
) -> Result<(), E>where
E: From<GitSnapshotError>,
pub fn verify_rehashed<E>(
&self,
archive_blob: GitSha1ObjectId,
descriptor_blob: GitSha1ObjectId,
operation_id: &str,
created_at_ms: u64,
hash_object: impl FnMut(GitSnapshotObjectKind, &[u8]) -> Result<GitSha1ObjectId, E>,
) -> Result<(), E>where
E: From<GitSnapshotError>,
Require both imported blob IDs before recomputing the three trees and commit.
The callback is deliberately process-neutral. Precomputation supplies an offline
git hash-object callback without -w; import supplies the same callback with -w.
Both paths therefore share the canonical byte construction while the private Git runner
retains command, environment, and repository policy. A blob mismatch returns before the
callback can write any tree or commit.
§Errors
Returns the callback error, a canonical-encoding failure, or
GitSnapshotError::ObjectGraphMismatch converted into E.
Trait Implementations§
Source§impl Clone for GitSnapshotObjectGraphV1
impl Clone for GitSnapshotObjectGraphV1
Source§impl Debug for GitSnapshotObjectGraphV1
impl Debug for GitSnapshotObjectGraphV1
Source§impl<'de> Deserialize<'de> for GitSnapshotObjectGraphV1
impl<'de> Deserialize<'de> for GitSnapshotObjectGraphV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for GitSnapshotObjectGraphV1
Source§impl PartialEq for GitSnapshotObjectGraphV1
impl PartialEq for GitSnapshotObjectGraphV1
Source§impl Serialize for GitSnapshotObjectGraphV1
impl Serialize for GitSnapshotObjectGraphV1
impl StructuralPartialEq for GitSnapshotObjectGraphV1
Auto Trait Implementations§
impl Freeze for GitSnapshotObjectGraphV1
impl RefUnwindSafe for GitSnapshotObjectGraphV1
impl Send for GitSnapshotObjectGraphV1
impl Sync for GitSnapshotObjectGraphV1
impl Unpin for GitSnapshotObjectGraphV1
impl UnsafeUnpin for GitSnapshotObjectGraphV1
impl UnwindSafe for GitSnapshotObjectGraphV1
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.