Struct rubbl_miriad::DataSet
source · pub struct DataSet { /* private fields */ }
Implementations§
source§impl DataSet
impl DataSet
pub fn open<P: AsPath>(path: P) -> Result<Self, MiriadFormatError>
pub fn item_names<'a>(
&'a mut self
) -> Result<DataSetItemNamesIterator<'a>, MiriadFormatError>
pub fn items<'a>(
&'a mut self
) -> Result<DataSetItemsIterator<'a>, MiriadFormatError>
sourcepub fn get<'a>(
&'a mut self,
item_name: &'a str
) -> Result<Option<Item<'a>>, MiriadFormatError>
pub fn get<'a>(
&'a mut self,
item_name: &'a str
) -> Result<Option<Item<'a>>, MiriadFormatError>
Get a handle to an item in this data set.
I feel like there should be a better way to do this, but right now the reference to item_name needs to have a lifetime compatible with the reference to the dataset itself.
pub fn open_uv(&mut self) -> Result<Decoder, MiriadFormatError>
pub fn new_uv_like(
&mut self,
template: &Decoder
) -> Result<Encoder, MiriadFormatError>
pub fn create_large_item(
&mut self,
name: &str,
ty: Type
) -> Result<WriteStream, MiriadFormatError>
pub fn set_small_item<T: MiriadMappedType>(
&mut self,
name: &str,
values: &[T]
) -> Result<(), MiriadFormatError>
pub fn set_scalar_item<T: MiriadMappedType>(
&mut self,
name: &str,
value: T
) -> Result<(), MiriadFormatError>
sourcepub fn flush(&mut self) -> Result<(), MiriadFormatError>
pub fn flush(&mut self) -> Result<(), MiriadFormatError>
Flush any pending changes to the overall dataset. In particular, this means that the “header” file is rewritten.