pub struct DatabaseOperationPayload {
pub operation: String,
pub entity: String,
pub affected_ids: Vec<i64>,
pub data: Option<Value>,
pub project_path: String,
}Expand description
Payload for database operation notifications
Fields§
§operation: StringOperation type: create, read, update, delete
entity: StringEntity type: task, event
affected_ids: Vec<i64>List of affected IDs
data: Option<Value>Full data for create/update operations Empty for delete operations
project_path: StringProject path (for multi-project scenarios)
Implementations§
Source§impl DatabaseOperationPayload
impl DatabaseOperationPayload
Sourcepub fn new(
operation: impl Into<String>,
entity: impl Into<String>,
affected_ids: Vec<i64>,
data: Option<Value>,
project_path: impl Into<String>,
) -> Self
pub fn new( operation: impl Into<String>, entity: impl Into<String>, affected_ids: Vec<i64>, data: Option<Value>, project_path: impl Into<String>, ) -> Self
Create a new database operation payload
Sourcepub fn task_created(
task_id: i64,
task_data: Value,
project_path: impl Into<String>,
) -> Self
pub fn task_created( task_id: i64, task_data: Value, project_path: impl Into<String>, ) -> Self
Helper: Create payload for task created
Sourcepub fn task_updated(
task_id: i64,
task_data: Value,
project_path: impl Into<String>,
) -> Self
pub fn task_updated( task_id: i64, task_data: Value, project_path: impl Into<String>, ) -> Self
Helper: Create payload for task updated
Sourcepub fn task_deleted(task_id: i64, project_path: impl Into<String>) -> Self
pub fn task_deleted(task_id: i64, project_path: impl Into<String>) -> Self
Helper: Create payload for task deleted
Sourcepub fn task_read(task_id: i64, project_path: impl Into<String>) -> Self
pub fn task_read(task_id: i64, project_path: impl Into<String>) -> Self
Helper: Create payload for task read
Sourcepub fn event_created(
event_id: i64,
event_data: Value,
project_path: impl Into<String>,
) -> Self
pub fn event_created( event_id: i64, event_data: Value, project_path: impl Into<String>, ) -> Self
Helper: Create payload for event created
Sourcepub fn event_updated(
event_id: i64,
event_data: Value,
project_path: impl Into<String>,
) -> Self
pub fn event_updated( event_id: i64, event_data: Value, project_path: impl Into<String>, ) -> Self
Helper: Create payload for event updated
Sourcepub fn event_deleted(event_id: i64, project_path: impl Into<String>) -> Self
pub fn event_deleted(event_id: i64, project_path: impl Into<String>) -> Self
Helper: Create payload for event deleted
Trait Implementations§
Source§impl Clone for DatabaseOperationPayload
impl Clone for DatabaseOperationPayload
Source§fn clone(&self) -> DatabaseOperationPayload
fn clone(&self) -> DatabaseOperationPayload
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 DatabaseOperationPayload
impl Debug for DatabaseOperationPayload
Source§impl<'de> Deserialize<'de> for DatabaseOperationPayload
impl<'de> Deserialize<'de> for DatabaseOperationPayload
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 DatabaseOperationPayload
impl RefUnwindSafe for DatabaseOperationPayload
impl Send for DatabaseOperationPayload
impl Sync for DatabaseOperationPayload
impl Unpin for DatabaseOperationPayload
impl UnwindSafe for DatabaseOperationPayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more