pub enum Operation {
AddTodo(AddTodoSpec),
AddProject(AddProjectSpec),
UpdateTodo(UpdateTodoSpec),
UpdateProject(UpdateProjectSpec),
CompleteTodo {
id: String,
},
CancelTodo {
id: String,
},
MoveTodo(MoveTodoSpec),
BulkRaw(BulkRawSpec),
}Variants§
AddTodo(AddTodoSpec)
AddProject(AddProjectSpec)
UpdateTodo(UpdateTodoSpec)
UpdateProject(UpdateProjectSpec)
CompleteTodo
CancelTodo
MoveTodo(MoveTodoSpec)
BulkRaw(BulkRawSpec)
Implementations§
Source§impl Operation
impl Operation
pub fn action_name(&self) -> &'static str
pub fn requires_auth_token(&self) -> bool
pub fn render_json(&self) -> Value
Sourcepub fn render_batch(&self) -> Vec<Value>
pub fn render_batch(&self) -> Vec<Value>
Returns the full batch as multiple JSON elements. For non-bulk variants,
this is a single-element vec wrapping render_json(). For BulkRaw,
the entire operations vec is returned. build_url uses this to
compose the URL’s payload array.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
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 Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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