risingwave_connector::source::base

Trait SplitMetaData

source
pub trait SplitMetaData: Sized {
    // Required methods
    fn id(&self) -> SplitId;
    fn encode_to_json(&self) -> JsonbVal;
    fn restore_from_json(value: JsonbVal) -> Result<Self>;
    fn update_offset(&mut self, last_seen_offset: String) -> ConnectorResult<()>;

    // Provided methods
    fn encode_to_bytes(&self) -> Bytes { ... }
    fn restore_from_bytes(bytes: &[u8]) -> Result<Self> { ... }
}
Expand description

The metadata of a split.

Required Methods§

source

fn id(&self) -> SplitId

source

fn encode_to_json(&self) -> JsonbVal

Encode the whole split metadata to a JSON object

source

fn restore_from_json(value: JsonbVal) -> Result<Self>

source

fn update_offset(&mut self, last_seen_offset: String) -> ConnectorResult<()>

Provided Methods§

source

fn encode_to_bytes(&self) -> Bytes

source

fn restore_from_bytes(bytes: &[u8]) -> Result<Self>

Object Safety§

This trait is not object safe.

Implementors§