eq
fn eq(Vec<byte> a, Vec<byte> b) -> bool Import
Source: use bytes::{eq}; src/bytes.hy Returns true when a and b have the same length and the same bytes.
Parameters#
| Name | Type |
|---|---|
a | Vec<byte> |
b | Vec<byte> |
Returns#
bool
Contracts#
Checked according to --contracts (see Contracts).
ensures !result || a.len() == b.len()
See also#
region_eq: True whena[ao..ao+n)equalsb[bo..bo+n)(caller guarantees bounds).to_hex: Encodesbufas lowercase hexadecimal, two digits per byte.from_hex: Decodes hexadecimal text (either case) into bytes.slice: Returns a copy ofsrc[start..end](end exclusive), with both offsets clamped to the buffer.concat: Returns a new buffer holdingafollowed byb.find_from: Returns the offset of the firstneedleinhayat or afterstart, or-1.find: Returns the offset of the firstneedleinhay, or-1.rfind: Returns the offset of the lastneedleinhay, or-1.