Skip to main content

FromPayload

Trait FromPayload 

Source
pub trait FromPayload: Sized {
    // Required method
    fn from_batch(batch: &RecordBatch) -> Result<Self>;
}
Expand description

Reading a typed value out of a decoded payload.

Implemented by every AstrsMessage in this module, and separately by the read-only view types that cannot be constructed from scratch.

Required Methods§

Source

fn from_batch(batch: &RecordBatch) -> Result<Self>

Reads the value from a decoded payload batch.

§Errors

DataError when the batch’s layout is not the one this type expects, or when it holds no rows.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§