pub struct WebhookBuilder<'a, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<'a, S: State> WebhookBuilder<'a, S>
impl<'a, S: State> WebhookBuilder<'a, S>
Sourcepub fn build(self) -> Webhook<'a>where
S: IsComplete,
pub fn build(self) -> Webhook<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn active(self, value: bool) -> WebhookBuilder<'a, SetActive<S>>where
S::Active: IsUnset,
pub fn active(self, value: bool) -> WebhookBuilder<'a, SetActive<S>>where
S::Active: IsUnset,
Required.
Whether this webhook is currently active.
Sourcepub fn created_at(self, value: Datetime) -> WebhookBuilder<'a, SetCreatedAt<S>>where
S::CreatedAt: IsUnset,
pub fn created_at(self, value: Datetime) -> WebhookBuilder<'a, SetCreatedAt<S>>where
S::CreatedAt: IsUnset,
Required.
When this webhook was created.
Sourcepub fn description(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetDescription<S>>where
S::Description: IsUnset,
pub fn description(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetDescription<S>>where
S::Description: IsUnset,
Sourcepub fn maybe_description(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetDescription<S>>where
S::Description: IsUnset,
pub fn maybe_description(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetDescription<S>>where
S::Description: IsUnset,
Sourcepub fn error_count(
self,
value: impl Into<i64>,
) -> WebhookBuilder<'a, SetErrorCount<S>>where
S::ErrorCount: IsUnset,
pub fn error_count(
self,
value: impl Into<i64>,
) -> WebhookBuilder<'a, SetErrorCount<S>>where
S::ErrorCount: IsUnset,
Sourcepub fn maybe_error_count(
self,
value: Option<impl Into<i64>>,
) -> WebhookBuilder<'a, SetErrorCount<S>>where
S::ErrorCount: IsUnset,
pub fn maybe_error_count(
self,
value: Option<impl Into<i64>>,
) -> WebhookBuilder<'a, SetErrorCount<S>>where
S::ErrorCount: IsUnset,
Sourcepub fn events(self, value: Vec<CowStr<'a>>) -> WebhookBuilder<'a, SetEvents<S>>where
S::Events: IsUnset,
pub fn events(self, value: Vec<CowStr<'a>>) -> WebhookBuilder<'a, SetEvents<S>>where
S::Events: IsUnset,
Required.
The types of events this webhook should receive.
Sourcepub fn id(self, value: impl Into<CowStr<'a>>) -> WebhookBuilder<'a, SetId<S>>where
S::Id: IsUnset,
pub fn id(self, value: impl Into<CowStr<'a>>) -> WebhookBuilder<'a, SetId<S>>where
S::Id: IsUnset,
Required.
Unique identifier for this webhook.
Sourcepub fn last_triggered(
self,
value: impl Into<Datetime>,
) -> WebhookBuilder<'a, SetLastTriggered<S>>where
S::LastTriggered: IsUnset,
pub fn last_triggered(
self,
value: impl Into<Datetime>,
) -> WebhookBuilder<'a, SetLastTriggered<S>>where
S::LastTriggered: IsUnset,
Sourcepub fn maybe_last_triggered(
self,
value: Option<impl Into<Datetime>>,
) -> WebhookBuilder<'a, SetLastTriggered<S>>where
S::LastTriggered: IsUnset,
pub fn maybe_last_triggered(
self,
value: Option<impl Into<Datetime>>,
) -> WebhookBuilder<'a, SetLastTriggered<S>>where
S::LastTriggered: IsUnset,
Sourcepub fn mute_words(
self,
value: impl Into<Vec<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetMuteWords<S>>where
S::MuteWords: IsUnset,
pub fn mute_words(
self,
value: impl Into<Vec<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetMuteWords<S>>where
S::MuteWords: IsUnset,
Sourcepub fn maybe_mute_words(
self,
value: Option<impl Into<Vec<CowStr<'a>>>>,
) -> WebhookBuilder<'a, SetMuteWords<S>>where
S::MuteWords: IsUnset,
pub fn maybe_mute_words(
self,
value: Option<impl Into<Vec<CowStr<'a>>>>,
) -> WebhookBuilder<'a, SetMuteWords<S>>where
S::MuteWords: IsUnset,
Sourcepub fn name(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetName<S>>where
S::Name: IsUnset,
pub fn name(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetName<S>>where
S::Name: IsUnset,
Sourcepub fn maybe_name(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetName<S>>where
S::Name: IsUnset,
pub fn maybe_name(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetName<S>>where
S::Name: IsUnset,
Sourcepub fn prefix(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn prefix(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn maybe_prefix(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn maybe_prefix(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn rewrite(
self,
value: impl Into<Vec<RewriteRule<'a>>>,
) -> WebhookBuilder<'a, SetRewrite<S>>where
S::Rewrite: IsUnset,
pub fn rewrite(
self,
value: impl Into<Vec<RewriteRule<'a>>>,
) -> WebhookBuilder<'a, SetRewrite<S>>where
S::Rewrite: IsUnset,
Sourcepub fn maybe_rewrite(
self,
value: Option<impl Into<Vec<RewriteRule<'a>>>>,
) -> WebhookBuilder<'a, SetRewrite<S>>where
S::Rewrite: IsUnset,
pub fn maybe_rewrite(
self,
value: Option<impl Into<Vec<RewriteRule<'a>>>>,
) -> WebhookBuilder<'a, SetRewrite<S>>where
S::Rewrite: IsUnset,
Sourcepub fn suffix(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetSuffix<S>>where
S::Suffix: IsUnset,
pub fn suffix(
self,
value: impl Into<CowStr<'a>>,
) -> WebhookBuilder<'a, SetSuffix<S>>where
S::Suffix: IsUnset,
Sourcepub fn maybe_suffix(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetSuffix<S>>where
S::Suffix: IsUnset,
pub fn maybe_suffix(
self,
value: Option<impl Into<CowStr<'a>>>,
) -> WebhookBuilder<'a, SetSuffix<S>>where
S::Suffix: IsUnset,
Sourcepub fn updated_at(
self,
value: impl Into<Datetime>,
) -> WebhookBuilder<'a, SetUpdatedAt<S>>where
S::UpdatedAt: IsUnset,
pub fn updated_at(
self,
value: impl Into<Datetime>,
) -> WebhookBuilder<'a, SetUpdatedAt<S>>where
S::UpdatedAt: IsUnset,
Sourcepub fn maybe_updated_at(
self,
value: Option<impl Into<Datetime>>,
) -> WebhookBuilder<'a, SetUpdatedAt<S>>where
S::UpdatedAt: IsUnset,
pub fn maybe_updated_at(
self,
value: Option<impl Into<Datetime>>,
) -> WebhookBuilder<'a, SetUpdatedAt<S>>where
S::UpdatedAt: IsUnset,
Sourcepub fn url(self, value: Uri<'a>) -> WebhookBuilder<'a, SetUrl<S>>where
S::Url: IsUnset,
pub fn url(self, value: Uri<'a>) -> WebhookBuilder<'a, SetUrl<S>>where
S::Url: IsUnset,
Required.
The webhook URL where events will be sent.
Sourcepub fn extra_data(
self,
value: BTreeMap<SmolStr, Data<'a>>,
) -> WebhookBuilder<'a, SetExtraData<S>>where
S::ExtraData: IsUnset,
pub fn extra_data(
self,
value: BTreeMap<SmolStr, Data<'a>>,
) -> WebhookBuilder<'a, SetExtraData<S>>where
S::ExtraData: IsUnset,
Sourcepub fn maybe_extra_data(
self,
value: Option<BTreeMap<SmolStr, Data<'a>>>,
) -> WebhookBuilder<'a, SetExtraData<S>>where
S::ExtraData: IsUnset,
pub fn maybe_extra_data(
self,
value: Option<BTreeMap<SmolStr, Data<'a>>>,
) -> WebhookBuilder<'a, SetExtraData<S>>where
S::ExtraData: IsUnset,
Auto Trait Implementations§
impl<'a, S> Freeze for WebhookBuilder<'a, S>
impl<'a, S> RefUnwindSafe for WebhookBuilder<'a, S>
impl<'a, S> Send for WebhookBuilder<'a, S>
impl<'a, S> Sync for WebhookBuilder<'a, S>
impl<'a, S> Unpin for WebhookBuilder<'a, S>
impl<'a, S> UnwindSafe for WebhookBuilder<'a, S>
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