pub struct AncillaryFilesManifest {
pub signable_manifest: SignableManifest<PathBuf, String>,
}
Expand description
Alias of SignableManifest for Ancillary files
Fields§
§signable_manifest: SignableManifest<PathBuf, String>
Inner manifest
Implementations§
Source§impl AncillaryFilesManifest
impl AncillaryFilesManifest
Sourcepub const ANCILLARY_MANIFEST_FILE_NAME: &str = "ancillary_manifest.json"
pub const ANCILLARY_MANIFEST_FILE_NAME: &str = "ancillary_manifest.json"
The file name used to serialize and deserialize AncillaryFilesManifest
files in JSON format
Sourcepub fn new(
data: BTreeMap<PathBuf, String>,
signature: ManifestSignature,
) -> Self
pub fn new( data: BTreeMap<PathBuf, String>, signature: ManifestSignature, ) -> Self
Instantiates a new AncillaryFilesManifest
Sourcepub fn new_without_signature(data: BTreeMap<PathBuf, String>) -> Self
pub fn new_without_signature(data: BTreeMap<PathBuf, String>) -> Self
Instantiates a new AncillaryFilesManifest
, without a signature
Sourcepub fn signature(&self) -> Option<ManifestSignature>
pub fn signature(&self) -> Option<ManifestSignature>
Get the manifest signature
Sourcepub fn set_signature(&mut self, signature: ManifestSignature)
pub fn set_signature(&mut self, signature: ManifestSignature)
Set the signature
Sourcepub async fn from_paths(
base_directory: &Path,
paths: Vec<PathBuf>,
) -> StdResult<Self>
pub async fn from_paths( base_directory: &Path, paths: Vec<PathBuf>, ) -> StdResult<Self>
Creates a new manifest, without a signature, from the files in the provided paths
The hash of each file will be computed and stored in the manifest
Sourcepub async fn verify_data(
&self,
base_directory: &Path,
) -> Result<(), AncillaryFilesManifestVerifyError>
pub async fn verify_data( &self, base_directory: &Path, ) -> Result<(), AncillaryFilesManifestVerifyError>
Verifies the integrity of the data in the manifest
Checks if the files in the manifest are present in the base directory and have the same hash
Sourcepub fn compute_hash(&self) -> Vec<u8> ⓘ
pub fn compute_hash(&self) -> Vec<u8> ⓘ
Aggregates the hashes of all the keys and values of the manifest
Trait Implementations§
Source§impl Clone for AncillaryFilesManifest
impl Clone for AncillaryFilesManifest
Source§fn clone(&self) -> AncillaryFilesManifest
fn clone(&self) -> AncillaryFilesManifest
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AncillaryFilesManifest
impl Debug for AncillaryFilesManifest
Source§impl<'de> Deserialize<'de> for AncillaryFilesManifest
impl<'de> Deserialize<'de> for AncillaryFilesManifest
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
Source§impl PartialEq for AncillaryFilesManifest
impl PartialEq for AncillaryFilesManifest
Source§impl Serialize for AncillaryFilesManifest
impl Serialize for AncillaryFilesManifest
impl Eq for AncillaryFilesManifest
impl StructuralPartialEq for AncillaryFilesManifest
Auto Trait Implementations§
impl Freeze for AncillaryFilesManifest
impl RefUnwindSafe for AncillaryFilesManifest
impl Send for AncillaryFilesManifest
impl Sync for AncillaryFilesManifest
impl Unpin for AncillaryFilesManifest
impl UnwindSafe for AncillaryFilesManifest
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
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>
Converts
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>
Converts
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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.