use super::sys; pub use sys::zbar_symbol_type_e as SymbolType; // TODO: config, modifiers #[derive(Debug)] pub struct Symbol { _type: SymbolType, data: Vec, } impl Symbol { pub(crate) fn new(_type: SymbolType, data: &[u8]) -> Self { Self { _type, data: data.to_vec(), } } pub fn _type(&self) -> SymbolType { self._type } pub fn data(&self) -> &[u8] { self.data.as_slice() } pub fn into_data(self) -> Vec { self.data } }