pub struct ValueToKey { /* private fields */ }Expand description
Extract key fields from the value.
Useful for creating a message key from specific value fields. Stores the key in the “after” data as “__key” field.
Implementations§
Source§impl ValueToKey
impl ValueToKey
Sourcepub fn with_fields<I, S>(fields: I) -> Self
pub fn with_fields<I, S>(fields: I) -> Self
Create from field names.
Sourcepub fn extract_key(&self, event: &CdcEvent) -> Option<Value>
pub fn extract_key(&self, event: &CdcEvent) -> Option<Value>
Extract key from event.
Trait Implementations§
Source§impl Clone for ValueToKey
impl Clone for ValueToKey
Source§fn clone(&self) -> ValueToKey
fn clone(&self) -> ValueToKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValueToKey
impl Debug for ValueToKey
Auto Trait Implementations§
impl Freeze for ValueToKey
impl RefUnwindSafe for ValueToKey
impl Send for ValueToKey
impl Sync for ValueToKey
impl Unpin for ValueToKey
impl UnsafeUnpin for ValueToKey
impl UnwindSafe for ValueToKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more