Struct twitch_api::helix::points::UpdateCustomRewardBody
source · [−]#[non_exhaustive]pub struct UpdateCustomRewardBody<'a> {Show 14 fields
pub title: Option<Cow<'a, str>>,
pub prompt: Option<Cow<'a, str>>,
pub cost: Option<usize>,
pub background_color: Option<Cow<'a, str>>,
pub is_enabled: Option<bool>,
pub is_user_input_required: Option<bool>,
pub is_max_per_stream_enabled: Option<bool>,
pub max_per_stream: Option<usize>,
pub is_max_per_user_per_stream_enabled: Option<bool>,
pub max_per_user_per_stream: Option<usize>,
pub is_global_cooldown_enabled: Option<bool>,
pub global_cooldown_seconds: Option<usize>,
pub is_paused: Option<bool>,
pub should_redemptions_skip_request_queue: Option<bool>,
}
helix
only.Expand description
Body Parameters for Update Custom Rewards
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.title: Option<Cow<'a, str>>
The title of the reward
prompt: Option<Cow<'a, str>>
The prompt for the viewer when they are redeeming the reward
cost: Option<usize>
The cost of the reward
background_color: Option<Cow<'a, str>>
Custom background color for the reward. Format: Hex with # prefix. Example: #00E5CB.
is_enabled: Option<bool>
Is the reward currently enabled, if false the reward won’t show up to viewers
is_user_input_required: Option<bool>
Does the user need to enter information when redeeming the reward.
is_max_per_stream_enabled: Option<bool>
Whether a maximum per stream is enabled
max_per_stream: Option<usize>
The maximum number per stream if enabled
is_max_per_user_per_stream_enabled: Option<bool>
Whether a maximum per user per stream is enabled. Defaults to false.
max_per_user_per_stream: Option<usize>
The maximum number per user per stream if enabled
is_global_cooldown_enabled: Option<bool>
Whether a cooldown is enabled. Defaults to false.
global_cooldown_seconds: Option<usize>
The cooldown in seconds if enabled
is_paused: Option<bool>
Is the reward currently paused, if true viewers can’t redeem
should_redemptions_skip_request_queue: Option<bool>
Should redemptions be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.
Implementations
sourceimpl<'a> UpdateCustomRewardBody<'a>
impl<'a> UpdateCustomRewardBody<'a>
sourcepub fn builder(
) -> UpdateCustomRewardBodyBuilder<'a, ((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> UpdateCustomRewardBodyBuilder<'a, ((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building UpdateCustomRewardBody
.
On the builder, call .title(...)
(optional), .prompt(...)
(optional), .cost(...)
(optional), .background_color(...)
(optional), .is_enabled(...)
(optional), .is_user_input_required(...)
(optional), .is_max_per_stream_enabled(...)
(optional), .max_per_stream(...)
(optional), .is_max_per_user_per_stream_enabled(...)
(optional), .max_per_user_per_stream(...)
(optional), .is_global_cooldown_enabled(...)
(optional), .global_cooldown_seconds(...)
(optional), .is_paused(...)
(optional), .should_redemptions_skip_request_queue(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of UpdateCustomRewardBody
.
Trait Implementations
sourceimpl<'a> Clone for UpdateCustomRewardBody<'a>
impl<'a> Clone for UpdateCustomRewardBody<'a>
sourcefn clone(&self) -> UpdateCustomRewardBody<'a>
fn clone(&self) -> UpdateCustomRewardBody<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for UpdateCustomRewardBody<'a>
impl<'a> Debug for UpdateCustomRewardBody<'a>
sourceimpl<'a> Default for UpdateCustomRewardBody<'a>
impl<'a> Default for UpdateCustomRewardBody<'a>
sourcefn default() -> UpdateCustomRewardBody<'a>
fn default() -> UpdateCustomRewardBody<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for UpdateCustomRewardBody<'a>
impl<'de: 'a, 'a> Deserialize<'de> for UpdateCustomRewardBody<'a>
sourcefn 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>,
sourceimpl<'a> PartialEq<UpdateCustomRewardBody<'a>> for UpdateCustomRewardBody<'a>
impl<'a> PartialEq<UpdateCustomRewardBody<'a>> for UpdateCustomRewardBody<'a>
sourcefn eq(&self, other: &UpdateCustomRewardBody<'a>) -> bool
fn eq(&self, other: &UpdateCustomRewardBody<'a>) -> bool
sourceimpl<'a> Serialize for UpdateCustomRewardBody<'a>
impl<'a> Serialize for UpdateCustomRewardBody<'a>
impl<'a> Eq for UpdateCustomRewardBody<'a>
impl<'a> StructuralEq for UpdateCustomRewardBody<'a>
impl<'a> StructuralPartialEq for UpdateCustomRewardBody<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for UpdateCustomRewardBody<'a>
impl<'a> Send for UpdateCustomRewardBody<'a>
impl<'a> Sync for UpdateCustomRewardBody<'a>
impl<'a> Unpin for UpdateCustomRewardBody<'a>
impl<'a> UnwindSafe for UpdateCustomRewardBody<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.sourceimpl<T> HelixRequestBody for Twhere
T: Serialize + SealedSerialize,
impl<T> HelixRequestBody for Twhere
T: Serialize + SealedSerialize,
sourcefn try_to_body(&self) -> Result<Bytes, BodyError>
fn try_to_body(&self) -> Result<Bytes, BodyError>
helix
only.