pub enum Operation {
Show 18 variants
UpdateProfile {
target: Expression,
set: HashMap<String, Expression>,
},
GetProfile {
target: Expression,
as: Option<String>,
},
CreateAction {
type: String,
subtype: Option<Expression>,
audience: Option<Expression>,
parent: Option<Expression>,
subject: Option<Expression>,
content: Option<Expression>,
attachments: Option<Expression>,
},
GetAction {
key: Option<Expression>,
action_id: Option<Expression>,
as: Option<String>,
},
UpdateAction {
target: Expression,
set: HashMap<String, UpdateValue>,
},
DeleteAction {
target: Expression,
},
If {
condition: Expression,
then: Vec<Operation>,
else: Option<Vec<Operation>>,
},
Switch {
value: Expression,
cases: HashMap<String, Vec<Operation>>,
default: Option<Vec<Operation>>,
},
Foreach {
array: Expression,
as: Option<String>,
do: Vec<Operation>,
},
Return {
value: Option<Expression>,
},
Set {
var: String,
value: Expression,
},
Get {
var: String,
from: Expression,
},
Merge {
objects: Vec<Expression>,
as: String,
},
BroadcastToFollowers {
action_id: Expression,
token: Expression,
},
SendToAudience {
action_id: Expression,
token: Expression,
audience: Expression,
},
CreateNotification {
user: Expression,
type: Expression,
action_id: Expression,
priority: Option<Expression>,
},
Log {
level: Option<String>,
message: Expression,
},
Abort {
error: Expression,
code: Option<String>,
},
}Expand description
DSL operation - tagged enum for all operation types
Variants§
UpdateProfile
GetProfile
CreateAction
Fields
§
subtype: Option<Expression>§
audience: Option<Expression>§
parent: Option<Expression>§
subject: Option<Expression>§
content: Option<Expression>§
attachments: Option<Expression>GetAction
UpdateAction
DeleteAction
Fields
§
target: ExpressionIf
Switch
Foreach
Return
Fields
§
value: Option<Expression>Set
Get
Merge
BroadcastToFollowers
SendToAudience
CreateNotification
Log
Abort
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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