pub struct SourceBundleDescriptor {
pub schema_version: u32,
pub archive: SourceArchive,
pub manifest: SourceManifest,
}Expand description
Versioned binding between one deterministic source ZIP and its manifest.
Fields§
§schema_version: u32Source-bundle descriptor schema version.
archive: SourceArchiveExact ZIP size and SHA-256 digest.
manifest: SourceManifestExact paths, sizes, modes, and digests represented by the ZIP.
Implementations§
Source§impl SourceBundleDescriptor
impl SourceBundleDescriptor
Sourcepub fn new(archive: SourceArchive, manifest: SourceManifest) -> Self
pub fn new(archive: SourceArchive, manifest: SourceManifest) -> Self
Bind an archive descriptor to its canonical manifest.
Sourcepub fn validate(&self, limits: SourceArchiveLimits) -> Result<(), SourceError>
pub fn validate(&self, limits: SourceArchiveLimits) -> Result<(), SourceError>
Validate the complete descriptor without reading archive bytes.
Byte-level integrity and ZIP-to-manifest correspondence are enforced by
verify_and_extract_source_bundle.
§Errors
Returns an error for an unsupported descriptor version, malformed or oversized archive descriptor, invalid limits, or non-canonical manifest.
Trait Implementations§
Source§impl Clone for SourceBundleDescriptor
impl Clone for SourceBundleDescriptor
Source§impl Debug for SourceBundleDescriptor
impl Debug for SourceBundleDescriptor
Source§impl<'de> Deserialize<'de> for SourceBundleDescriptor
impl<'de> Deserialize<'de> for SourceBundleDescriptor
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SourceBundleDescriptor
Source§impl JsonSchema for SourceBundleDescriptor
impl JsonSchema for SourceBundleDescriptor
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SourceBundleDescriptor
impl PartialEq for SourceBundleDescriptor
Source§impl Serialize for SourceBundleDescriptor
impl Serialize for SourceBundleDescriptor
impl StructuralPartialEq for SourceBundleDescriptor
Auto Trait Implementations§
impl Freeze for SourceBundleDescriptor
impl RefUnwindSafe for SourceBundleDescriptor
impl Send for SourceBundleDescriptor
impl Sync for SourceBundleDescriptor
impl Unpin for SourceBundleDescriptor
impl UnsafeUnpin for SourceBundleDescriptor
impl UnwindSafe for SourceBundleDescriptor
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.