Address Michael's comments

This commit is contained in:
Paul Hauner
2019-09-26 13:00:31 +10:00
parent b4806d27eb
commit 97a45cdcb8
3 changed files with 4 additions and 51 deletions

View File

@@ -27,6 +27,10 @@ pub trait Encode {
BYTES_PER_LENGTH_OFFSET
}
/// Returns the size (in bytes) when `self` is serialized.
///
/// Returns the same value as `self.as_ssz_bytes().len()` but this method is significantly more
/// efficient.
fn ssz_bytes_len(&self) -> usize;
/// Returns the full-form encoding of this object.