pub struct Workflow { /* private fields */ }Expand description
Workflow object representation.
§Fields and Validations
For more details, see the official documentation.
| Field | Type | Required | Validation |
|---|---|---|---|
| trigger | Trigger | Yes | N/A |
§Example
use slack_messaging::composition_objects::{types::InputParameter, Trigger, Workflow};
let workflow = Workflow::builder()
.trigger(
Trigger::builder()
.url("https://slack.com/shortcuts/Ft0123ABC456/123...xyz")
.customizable_input_parameter(
InputParameter::builder()
.name("input_parameter_a")
.value("Value for input param A")
.build()?
)
.customizable_input_parameter(
InputParameter::builder()
.name("input_parameter_b")
.value("Value for input param B")
.build()?
)
.build()?
)
.build()?;
let expected = serde_json::json!({
"trigger": {
"url": "https://slack.com/shortcuts/Ft0123ABC456/123...xyz",
"customizable_input_parameters": [
{
"name": "input_parameter_a",
"value": "Value for input param A"
},
{
"name": "input_parameter_b",
"value": "Value for input param B"
}
]
}
});
let json = serde_json::to_value(workflow).unwrap();
assert_eq!(json, expected);
// If your object has any validation errors, the build method returns Result::Err
let workflow = Workflow::builder().build();
assert!(workflow.is_err());Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn builder() -> WorkflowBuilder
pub fn builder() -> WorkflowBuilder
constract WorkflowBuilder object.
Trait Implementations§
impl StructuralPartialEq for Workflow
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe for Workflow
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)