Struct adder_codec_rs::raw::stream::Raw
source · pub struct Raw {
pub codec_version: u8,
pub header_size: usize,
pub plane: PlaneSize,
pub tps: DeltaT,
pub ref_interval: DeltaT,
pub delta_t_max: DeltaT,
pub event_size: u8,
pub source_camera: SourceCamera,
/* private fields */
}
Fields§
§codec_version: u8
§header_size: usize
§plane: PlaneSize
§tps: DeltaT
§ref_interval: DeltaT
§delta_t_max: DeltaT
§event_size: u8
§source_camera: SourceCamera
Trait Implementations§
source§impl Codec for Raw
impl Codec for Raw
source§fn encode_header(
&mut self,
plane: PlaneSize,
tps: DeltaT,
ref_interval: DeltaT,
delta_t_max: DeltaT,
codec_version: u8,
source_camera: SourceCamera
) -> Result<(), Box<dyn Error>>
fn encode_header(
&mut self,
plane: PlaneSize,
tps: DeltaT,
ref_interval: DeltaT,
delta_t_max: DeltaT,
codec_version: u8,
source_camera: SourceCamera
) -> Result<(), Box<dyn Error>>
Encode the header for this Raw
. If an [input_stream
] is open for this struct
already, then it is dropped. Intended usage is to create a separate Raw
if you
want to read and write two streams at once (for example, if you are cropping the spatial
pixels of a stream, reducing the number of channels, or scaling the DeltaT
values in
some way).
fn new() -> Self
fn get_source_type(&self) -> SourceType
source§fn write_eof(&mut self) -> Result<(), Error>
fn write_eof(&mut self) -> Result<(), Error>
Write the EOF event signifier to the output stream Read more
source§fn flush_writer(&mut self) -> Result<()>
fn flush_writer(&mut self) -> Result<()>
Flush the stream so that program can be exited safely Read more
source§fn close_writer(&mut self) -> Result<(), Box<dyn Error>>
fn close_writer(&mut self) -> Result<(), Box<dyn Error>>
Close the stream writer safely Read more
source§fn close_reader(&mut self)
fn close_reader(&mut self)
Close the stream reader safely
fn set_output_stream(&mut self, stream: Option<BufWriter<File>>)
fn has_output_stream(&self) -> bool
fn set_input_stream(&mut self, stream: Option<BufReader<File>>)
source§fn set_input_stream_position(&mut self, pos: u64) -> Result<(), Error>
fn set_input_stream_position(&mut self, pos: u64) -> Result<(), Error>
Go to this position (as a byte address) in the input stream. Read more
source§fn set_input_stream_position_from_end(&mut self, pos: i64) -> Result<(), Error>
fn set_input_stream_position_from_end(&mut self, pos: i64) -> Result<(), Error>
Go to this position (as a byte address) in the input stream, relative to the end
of the stream Read more
source§fn get_input_stream_position(&mut self) -> Result<u64, Box<dyn Error>>
fn get_input_stream_position(&mut self) -> Result<u64, Box<dyn Error>>
Get the current position (as a byte address) in the input stream. Read more
fn get_eof_position(&mut self) -> Result<u64, Box<dyn Error>>
fn decode_header(&mut self) -> Result<usize, Box<dyn Error>>
fn encode_event(&mut self, event: &Event) -> Result<(), Error>
fn encode_events(&mut self, events: &[Event]) -> Result<(), Error>
fn encode_events_events(&mut self, events: &[Vec<Event>]) -> Result<(), Error>
fn decode_event(&mut self) -> Result<Event, Error>
Auto Trait Implementations§
impl RefUnwindSafe for Raw
impl Send for Raw
impl Sync for Raw
impl Unpin for Raw
impl UnwindSafe for Raw
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.