pub struct TriggerBuilder { /* private fields */ }
Expand description
Builder for creating test Trigger instances
Implementations§
Source§impl TriggerBuilder
impl TriggerBuilder
pub fn new() -> Self
pub fn name(self, name: &str) -> Self
pub fn config(self, config: TriggerTypeConfig) -> Self
pub fn webhook(self, url: &str) -> Self
pub fn slack(self, webhook_url: &str) -> Self
pub fn discord(self, webhook_url: &str) -> Self
pub fn telegram( self, token: &str, chat_id: &str, disable_web_preview: bool, ) -> Self
pub fn telegram_token(self, token: SecretValue) -> Self
pub fn script(self, script_path: &str, language: ScriptLanguage) -> Self
pub fn script_arguments(self, arguments: Vec<String>) -> Self
pub fn script_timeout_ms(self, timeout_ms: u32) -> Self
pub fn message(self, title: &str, body: &str) -> Self
pub fn trigger_type(self, trigger_type: TriggerType) -> Self
pub fn email( self, host: &str, username: &str, password: &str, sender: &str, recipients: Vec<&str>, ) -> Self
pub fn email_port(self, port: u16) -> Self
pub fn email_subject(self, subject: &str) -> Self
pub fn email_username(self, username: SecretValue) -> Self
pub fn email_password(self, password: SecretValue) -> Self
pub fn webhook_method(self, method: &str) -> Self
pub fn webhook_secret(self, secret: SecretValue) -> Self
pub fn webhook_headers(self, headers: HashMap<String, String>) -> Self
pub fn url(self, url: SecretValue) -> Self
pub fn build(self) -> Trigger
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TriggerBuilder
impl RefUnwindSafe for TriggerBuilder
impl Send for TriggerBuilder
impl Sync for TriggerBuilder
impl Unpin for TriggerBuilder
impl UnwindSafe for TriggerBuilder
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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