pub trait AsBytes {
const LENGTH: usize;
fn as_bytes(&self) -> [u8; Self::LENGTH];
}
The error, on line 3, is that no associated item named 'LENGTH' found for type 'Self' in the current scope
. But Self
is an AsBytes
, isn't it?
pub trait AsBytes {
const LENGTH: usize;
fn as_bytes(&self) -> [u8; Self::LENGTH];
}
The error, on line 3, is that no associated item named 'LENGTH' found for type 'Self' in the current scope
. But Self
is an AsBytes
, isn't it?
Oh, cool.