pub struct Hasher {
bytes: Bytes,
}
Fields
bytes: Bytes
Implementations
pub fn new() -> Self
pub fn with_capacity(capacity: u64) -> Self
pub fn write(
refmut self,
bytes: Bytes,
)
pub fn write(
refmut self,
bytes: Bytes,
)
Appends content of bytes
to this Hasher
.
Note that the length of bytes
is not appended to the
Hasher
, just the content.
pub fn write_raw_slice(
refmut self,
slice: raw_slice,
)
pub fn write_raw_slice(
refmut self,
slice: raw_slice,
)
Appends bytes from the slice
to this Hasher
.
Note that the length of slice
is not appended to the
Hasher
, just the bytes within the slice
.
pub fn write_u8(
refmut self,
value: u8,
)
pub fn write_u8(
refmut self,
value: u8,
)
Appends u8
value
to this Hasher
.
pub fn write_str(
refmut self,
s: str,
)
pub fn write_str(
refmut self,
s: str,
)
Appends a single str
to this Hasher
.
Note that the length of s
is not appended to the
Hasher
, just the bytes forming the string s
.
pub fn write_str_array(
refmut self,
s: S,
)
pub fn write_str_array(
refmut self,
s: S,
)
Appends a single string array to this Hasher
.
Note that the length of s
is not appended to the
Hasher
, just the bytes forming the string array s
.