Skip to content

Extension traits to read primitive types

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE-2.0
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

heberlein/read-primitives

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

read-primitives

read-primitives adds several extension traits, that make it easy to read primitive types from any type that implements std::io::Read

Examples

    fn main() {
        let bytes: [u8; 8] = [24, 45, 68, 84, 251, 33, 9, 64];
        let float = bytes.as_slice().read_le_f64().unwrap();
        printf!("{float}");
    }

3.141592653589793

About

Extension traits to read primitive types

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE-2.0
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages