Trait alice_protocol_reader::scan_cdp::ScanCDP
source · pub trait ScanCDP {
// Required methods
fn load_rdh_cru<T: RDH>(&mut self) -> Result<T, Error>;
fn load_payload_raw(
&mut self,
payload_size: usize
) -> Result<Vec<u8>, Error>;
fn load_next_rdh_to_filter<T: RDH>(
&mut self,
offset_to_next: u16,
target: FilterTarget
) -> Result<T, Error>;
fn current_mem_pos(&self) -> u64;
// Provided method
fn load_cdp<T: RDH>(&mut self) -> Result<(T, Vec<u8>, u64), Error> { ... }
}Expand description
Trait for a scanner that reads CDPs from a file or stdin
Required Methods§
sourcefn load_rdh_cru<T: RDH>(&mut self) -> Result<T, Error>
fn load_rdh_cru<T: RDH>(&mut self) -> Result<T, Error>
Loads the next RDH from the input and returns it
sourcefn load_payload_raw(&mut self, payload_size: usize) -> Result<Vec<u8>, Error>
fn load_payload_raw(&mut self, payload_size: usize) -> Result<Vec<u8>, Error>
Loads the payload in the form of raw bytes from the input and returns it
The size of the payload is given as an argument.
sourcefn load_next_rdh_to_filter<T: RDH>(
&mut self,
offset_to_next: u16,
target: FilterTarget
) -> Result<T, Error>
fn load_next_rdh_to_filter<T: RDH>( &mut self, offset_to_next: u16, target: FilterTarget ) -> Result<T, Error>
Loads the next RDH that matches the user specified filter target from the input and returns it
sourcefn current_mem_pos(&self) -> u64
fn current_mem_pos(&self) -> u64
Convenience function to return the current memory position in the input stream
Provided Methods§
Object Safety§
This trait is not object safe.