update
XuAPI
pub fn update(d int, data &string) intPurpose
update; returns int.
Parameters
dint- d (int)
data&string- data (borrowed; caller keeps it; type &string)
Returns
int — a value of this type
API
#hash/adler32Adler-32.
updatepub fn update(d int, data &string) intupdate; returns int.
d intdata &stringint — a value of this type
checksumpub fn checksum(data &string) intchecksum; returns int.
data &stringint — a value of this type
struct Digestpub struct Digest {
pub s int
}Public struct `Digest`.
s intnewpub fn new() DigestConstruct a new value of this type.
none
Digest — a value of this type
(&mut Digest) writepub fn (d &mut Digest) write(p &string) intMethod on `&mut Digest`: write data and return the byte count.
d &mut Digestp &stringint — bytes written
(&Digest) sumpub fn (d &Digest) sum() intMethod on `&Digest`: compute a digest (often lowercase hex).
d &Digestint — a value of this type
(&Digest) sizepub fn (d &Digest) size() intMethod on `&Digest`: return the size.
d &Digestint — a value of this type
(&mut Digest) resetpub fn (d &mut Digest) reset()Method on `&mut Digest`: clear internal state so the value can be reused.
d &mut Digest