Skip to main content

AdvReaderThread

Struct AdvReaderThread 

Source
pub struct AdvReaderThread {
Show 27 fields pub source: Source, pub tx: Sender<Option<(usize, Result<AdvReturnValue, Error>)>>, pub stop: Arc<AtomicBool>, pub buffer_size: usize, pub start: Option<usize>, pub buffer_end: usize, pub line_num: usize, pub slash: bool, pub state: ReaderState, pub encode_comments: bool, pub encode_strings: bool, pub convert2numbers: bool, pub keep_base: bool, pub skip_comments: bool, pub trim: bool, pub bool_false: Option<Vec<u8>>, pub bool_true: Option<Vec<u8>>, pub line_end: u8, pub double_quote_escape: bool, pub extended_word_separation: bool, pub escape: bool, pub asterisk: bool, pub string: bool, pub quote: bool, pub block_reader: Option<Box<dyn Block + Send + Sync>>, pub encoding: Option<String>, pub encoder_errors: Option<String>,
}

Fields§

§source: Source§tx: Sender<Option<(usize, Result<AdvReturnValue, Error>)>>§stop: Arc<AtomicBool>§buffer_size: usize§start: Option<usize>§buffer_end: usize§line_num: usize§slash: bool§state: ReaderState§encode_comments: bool§encode_strings: bool§convert2numbers: bool§keep_base: bool§skip_comments: bool§trim: bool§bool_false: Option<Vec<u8>>§bool_true: Option<Vec<u8>>§line_end: u8§double_quote_escape: bool§extended_word_separation: bool§escape: bool§asterisk: bool§string: bool§quote: bool§block_reader: Option<Box<dyn Block + Send + Sync>>§encoding: Option<String>§encoder_errors: Option<String>

Implementations§

Source§

impl AdvReaderThread

Source

pub fn new( options: AdvReaderOptions, tx: Sender<Option<(usize, Result<AdvReturnValue, Error>)>>, stop: Arc<AtomicBool>, block_reader: Option<Box<dyn Block + Send + Sync>>, ) -> Result<Self, Error>

Source

pub fn read_number( &mut self, itr: &mut Enumerate<Iter<'_, u8>>, i: usize, c: u8, ) -> (usize, u8, Option<AdvReturnValue>)

Source

pub fn read_line_comment( &mut self, itr: &mut Enumerate<Iter<'_, u8>>, i: usize, c: u8, ) -> Option<(usize, u8)>

Source

pub fn read_comment( &mut self, itr: &mut Enumerate<Iter<'_, u8>>, i: usize, c: u8, ) -> Option<(usize, u8)>

Source

pub fn read(&mut self) -> Result<(usize, ReaderState), Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.