pub trait BinDisplay {
type BinEntry;
// Required methods
fn display_bin_iter(&self) -> Box<dyn Iterator<Item = Self::BinEntry> + '_>;
fn write_bin<W: Write>(entry: &Self::BinEntry, writer: W) -> Result<()>;
fn write_header<W: Write>(&self, writer: W) -> Result<()>;
}
Expand description
§Trait used to display bins
- This is, e.g., used by the glue writers to write the bins of the merged results
Required Associated Types§
Required Methods§
Sourcefn display_bin_iter(&self) -> Box<dyn Iterator<Item = Self::BinEntry> + '_>
fn display_bin_iter(&self) -> Box<dyn Iterator<Item = Self::BinEntry> + '_>
§Iterator over all the bins
- you might require to use this if you are working with generics
- if you are working with a specific type there is usually a more efficient implementation
that did not require the usage of dynamic traits (
dyn
) and that are thus more efficient, consider using those instead
Sourcefn write_bin<W: Write>(entry: &Self::BinEntry, writer: W) -> Result<()>
fn write_bin<W: Write>(entry: &Self::BinEntry, writer: W) -> Result<()>
§For writing a bin
- How to write a bin to a file? If a bin consists, e.g., of an exclusive and inclusive border this might require the writing of two values. It could also be a single value instead. It should be something the user expects from your binning, see write header
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.