pub struct DigestVerifier { /* private fields */ }Expand description
Re-export framework services (HTTP, URI, etc.) from the dedicated services crate. Checks a package as it is read, so a package too large to hold in memory is still checked.
An installer feeds every chunk it writes through this and calls
DigestVerifier::finish before committing; nothing installs a package
whose bytes were never seen in full.
Implementations§
Source§impl DigestVerifier
impl DigestVerifier
Sourcepub fn new(expected: PackageDigest) -> Result<DigestVerifier, AppUpdateError>
pub fn new(expected: PackageDigest) -> Result<DigestVerifier, AppUpdateError>
A verifier for expected, or an error when the digest is malformed.
Sourcepub fn finish(self) -> Result<(), AppUpdateError>
pub fn finish(self) -> Result<(), AppUpdateError>
Checks what was read against what was promised.
Auto Trait Implementations§
impl Freeze for DigestVerifier
impl RefUnwindSafe for DigestVerifier
impl Send for DigestVerifier
impl Sync for DigestVerifier
impl Unpin for DigestVerifier
impl UnsafeUnpin for DigestVerifier
impl UnwindSafe for DigestVerifier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.