dbn::compat

Trait SymbolMappingRec

Source
pub trait SymbolMappingRec: HasRType {
    // Required methods
    fn stype_in_symbol(&self) -> Result<&str>;
    fn stype_out_symbol(&self) -> Result<&str>;
    fn start_ts(&self) -> Option<OffsetDateTime>;
    fn end_ts(&self) -> Option<OffsetDateTime>;
}
Expand description

A trait for symbol mapping records.

Required Methods§

Source

fn stype_in_symbol(&self) -> Result<&str>

Returns the input symbol as a &str.

§Errors

This function returns an error if stype_in_symbol contains invalid UTF-8.

Source

fn stype_out_symbol(&self) -> Result<&str>

Returns the output symbol as a &str.

§Errors

This function returns an error if stype_out_symbol contains invalid UTF-8.

Source

fn start_ts(&self) -> Option<OffsetDateTime>

Parses the raw start of the mapping interval into a datetime. Returns None if start_ts contains the sentinel for a null timestamp.

Source

fn end_ts(&self) -> Option<OffsetDateTime>

Parses the raw end of the mapping interval into a datetime. Returns None if end_ts contains the sentinel for a null timestamp.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§