pub struct ChangeEvent {
pub sequence: u64,
pub entity: String,
pub id: String,
pub operation: Operation,
pub data: Option<Value>,
pub operation_id: Option<String>,
pub sender: Option<String>,
pub client_id: Option<String>,
pub scope: Option<(String, String)>,
pub recipients: Option<Vec<String>>,
}Fields§
§sequence: u64§entity: String§id: String§operation: Operation§data: Option<Value>§operation_id: Option<String>§sender: Option<String>§client_id: Option<String>§scope: Option<(String, String)>§recipients: Option<Vec<String>>Implementations§
Source§impl ChangeEvent
impl ChangeEvent
pub fn new( entity: String, id: String, operation: Operation, data: Option<Value>, ) -> Self
pub fn with_operation_id(self, operation_id: String) -> Self
pub fn with_sender(self, sender: Option<String>) -> Self
pub fn with_client_id(self, client_id: Option<String>) -> Self
pub fn with_scope(self, scope: Option<(String, String)>) -> Self
pub fn create(entity: String, id: String, data: Value) -> Self
pub fn update(entity: String, id: String, data: Value) -> Self
pub fn delete(entity: String, id: String, data: Value) -> Self
pub fn event_topic(&self, num_partitions: u8) -> String
pub fn partition(&self, num_partitions: u8) -> u8
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ChangeEvent
impl Debug for ChangeEvent
Source§impl<'de> Deserialize<'de> for ChangeEvent
impl<'de> Deserialize<'de> for ChangeEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChangeEvent
impl RefUnwindSafe for ChangeEvent
impl Send for ChangeEvent
impl Sync for ChangeEvent
impl Unpin for ChangeEvent
impl UnsafeUnpin for ChangeEvent
impl UnwindSafe for ChangeEvent
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