Struct ckb_types::packed::BytesReader [−][src]
pub struct BytesReader<'r>(_);
Implementations
Converts self to a string slice without checking that the string contains valid UTF-8.
Safety
This function is unsafe because it does not check that the bytes passed to
it are valid UTF-8. If this constraint is violated, undefined behavior
results, as the rest of Rust assumes that &str
s are valid UTF-8.
Calculates the hash for raw data in Bytes
.
Returns the empty hash if no data, otherwise, calculates the hash of the data and returns it.
Trait Implementations
Auto Trait Implementations
impl<'r> RefUnwindSafe for BytesReader<'r>
impl<'r> Send for BytesReader<'r>
impl<'r> Sync for BytesReader<'r>
impl<'r> Unpin for BytesReader<'r>
impl<'r> UnwindSafe for BytesReader<'r>
Blanket Implementations
Mutably borrows from an owned value. Read more
Unwraps the result of from_slice(..)
with confidence and we assume that it’s impossible to fail.