endicon

Crates.ioendicon
lib.rsendicon
version3.0.0
sourcesrc
created_at2018-10-10 17:28:45.705948
updated_at2020-09-07 20:09:09.327417
descriptionImplementations of codicon traits for endianness encodings
homepage
repositoryhttps://github.com/psilocybin/endicon
max_upload_size
id89104
size21,826
Nathaniel McCallum (npmccallum)

documentation

https://docs.rs/endicon

README

Workflow Status Average time to resolve an issue Percentage of issues still open Maintenance

endicon

Implements endianness encodings using the codicon traits.

See the codicon crate for details.

Examples

use endicon::Endianness;
use codicon::Encoder;

let mut bytes = [0u8; 2];
let little = [1u8, 0u8];
let big = [0u8, 1u8];

1u16.encode(&mut bytes.as_mut(), Endianness::Little).unwrap();
assert_eq!(bytes, little);

1u16.encode(&mut bytes.as_mut(), Endianness::Big).unwrap();
assert_eq!(bytes, big);

License: Apache-2.0

Commit count: 21

cargo fmt