Skip to main content

DefaultFormat

Trait DefaultFormat 

Source
pub trait DefaultFormat: Sized {
    // Required method
    fn default_format() -> Self;
}
Expand description

A format that can be constructed without configuration.

Needed by server-side extractors, which are built by the framework rather than by the user and so have nowhere to receive constructor arguments. A method rather than a Default supertrait on StreamFormat, so that a format which genuinely cannot be defaulted is not locked out of the rest of the abstraction.

Required Methods§

Source

fn default_format() -> Self

The configuration to use when the caller supplied none.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl DefaultFormat for ArrowRecordBatchIpcStreamFormat

Available on crate feature arrow only.
Source§

impl DefaultFormat for CsvStreamFormat

Available on crate feature csv only.
Source§

impl DefaultFormat for JsonArrayStreamFormat<()>

Available on crate feature json only.
Source§

impl DefaultFormat for JsonNewLineStreamFormat

Available on crate feature json only.
Source§

impl DefaultFormat for ProtobufStreamFormat

Available on crate feature protobuf only.
Source§

impl DefaultFormat for TextStreamFormat

Available on crate feature text only.