Trait rubbl_miriad::MiriadMappedType [−][src]
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.
Associated Constants
Required methods
fn encode_values_into_vec(values: &[Self], vec: &mut Vec<u8>)
Provided methods
fn get_miriad_count(values: &[Self]) -> usize
fn get_miriad_count(values: &[Self]) -> usize
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.