hunk 0.1.0

A framework for in-memory data representations with a functional API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Stuf goes here
pub const EMPTY : ByteHunk<'static> = ByteHunk{ bytes: &[] };

/// Represents a hunk of raw data constructed from an in-memory byte
/// array.
pub struct ByteHunk<'a> {
    pub bytes: &'a [u8]
}

impl<'a> ByteHunk<'a> {
    pub fn new(bytes: &'a [u8]) -> ByteHunk<'a> {
	ByteHunk{bytes}
    }
}