We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This issue is intended to be discussed in the context of zerovec 1.0 / holistic design
I've thought this for a while but I wasn't able to find an issue for it. The trait is currently:
pub unsafe trait ULE where Self: Sized + Copy + 'static, { // Required method fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError>; // Provided methods fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], UleError> { ... } unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self] { ... } fn as_byte_slice(slice: &[Self]) -> &[u8] { ... } }
I think we should add:
validate_chunk(chunk: [u8; size_of::<Self>]) -> Result<(), UleError>
parse_chunk
from_chunk_unchecked
and then change validate_byte_slice to be a provided method.
validate_byte_slice
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue is intended to be discussed in the context of zerovec 1.0 / holistic design
I've thought this for a while but I wasn't able to find an issue for it. The trait is currently:
I think we should add:
validate_chunk(chunk: [u8; size_of::<Self>]) -> Result<(), UleError>
(required method)parse_chunk
(provided method)from_chunk_unchecked
(provided method)and then change
validate_byte_slice
to be a provided method.The text was updated successfully, but these errors were encountered: