method View.encoded
The encoded bytes the view reads (shared, not copied).
Example:
use std.ser { encode }
use std.core { decode_view }
fn main() io {
let buf = encode(&(42 as i64))!
let v = decode_view<i64>(&buf)!
print("{v.encoded().len() == buf.len()}")
}Output
true
pub(api) fn encoded() -> bytesComplexity. O(1): the bytes are shared, not copied.
Since. 1.0.0-beta
Returns
bytes
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/view.oxl:82