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§
fn id(&self) -> SplitId
sourcefn encode_to_json(&self) -> JsonbVal
fn encode_to_json(&self) -> JsonbVal
Encode the whole split metadata to a JSON object
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>
Object Safety§
This trait is not object safe.