pub struct Format<'a, B: BorrowMut<Buffer> + Borrow<Buffer>> { /* private fields */ }
Implementations§
Source§impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Format<'a, B>
impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Format<'a, B>
pub fn inner(&self) -> &bcf_fmt_t
pub fn inner_mut(&mut self) -> &mut bcf_fmt_t
Sourcepub fn integer(self) -> Result<BufferBacked<'b, Vec<&'b [i32]>, B>>
pub fn integer(self) -> Result<BufferBacked<'b, Vec<&'b [i32]>, B>>
Get format data as integers.
Attention: the returned BufferBacked which holds the data has to be kept in scope as long as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.
Sourcepub fn float(self) -> Result<BufferBacked<'b, Vec<&'b [f32]>, B>>
pub fn float(self) -> Result<BufferBacked<'b, Vec<&'b [f32]>, B>>
Get format data as floats.
Attention: the returned BufferBacked which holds the data has to be kept in scope as along as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.
Sourcepub fn string(self) -> Result<BufferBacked<'b, Vec<&'b [u8]>, B>>
pub fn string(self) -> Result<BufferBacked<'b, Vec<&'b [u8]>, B>>
Get format data as byte slices. To obtain the values strings, use std::str::from_utf8
.
Attention: the returned BufferBacked which holds the data has to be kept in scope as along as the data is accessed. If parts of the data are accessed while the BufferBacked object is already dropped, you will access unallocated memory.