pub trait MiriadMappedType: Sized {
    const TYPE: Type;

    fn vec_from_miriad_reader<R: Read>(stream: R) -> Result<Vec<Self>, Error>;
    fn decode_buf_into_vec(buf: &[u8], vec: &mut Vec<Self>);
    fn encode_values_into_vec(values: &[Self], vec: &mut Vec<u8>);

    fn vec_from_miriad_bytes(buf: &[u8]) -> Result<Vec<Self>, Error> { ... }
    fn get_miriad_count(values: &[Self]) -> usize { ... }
}
Expand description

This trait marks that the given type maps onto a type defined in the MIRIAD data format.

Required Associated Constants§

The particular MIRIAD Type to which this Rust type maps.

Required Methods§

Provided Methods§

This is a hack so we can write type-generic functions that can figure out how many bytes are in a string.

Implementations on Foreign Types§

As a special hack, this only ever returns a 1-element vector.

Implementors§