Struct twitch_api::helix::moderation::manage_held_automod_messages::ManageHeldAutoModMessagesBody
source · [−]#[non_exhaustive]pub struct ManageHeldAutoModMessagesBody<'a> {
pub user_id: Cow<'a, UserIdRef>,
pub msg_id: Cow<'a, MsgIdRef>,
pub action: AutoModAction,
}
Available on crate feature
helix
only.Expand description
Body Parameters for Manage Held AutoMod Messages
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.user_id: Cow<'a, UserIdRef>
The moderator who is approving or rejecting the held message. Must match the user_id in the user OAuth token.
msg_id: Cow<'a, MsgIdRef>
ID of the message to be allowed or denied. These message IDs are retrieved from IRC or PubSub. Only one message ID can be provided.
action: AutoModAction
The action to take for the message. Must be “ALLOW” or “DENY”.
Implementations
sourceimpl<'a> ManageHeldAutoModMessagesBody<'a>
impl<'a> ManageHeldAutoModMessagesBody<'a>
sourcepub fn builder() -> ManageHeldAutoModMessagesBodyBuilder<'a, ((), (), ())>
pub fn builder() -> ManageHeldAutoModMessagesBodyBuilder<'a, ((), (), ())>
Create a builder for building ManageHeldAutoModMessagesBody
.
On the builder, call .user_id(...)
, .msg_id(...)
, .action(...)
to set the values of the fields.
Finally, call .build()
to create the instance of ManageHeldAutoModMessagesBody
.
sourceimpl<'a> ManageHeldAutoModMessagesBody<'a>
impl<'a> ManageHeldAutoModMessagesBody<'a>
sourcepub fn new(
user_id: impl IntoCow<'a, UserIdRef> + 'a,
msg_id: impl IntoCow<'a, MsgIdRef> + 'a,
action: impl Into<AutoModAction>
) -> Self
pub fn new(
user_id: impl IntoCow<'a, UserIdRef> + 'a,
msg_id: impl IntoCow<'a, MsgIdRef> + 'a,
action: impl Into<AutoModAction>
) -> Self
Create a new ManageHeldAutoModMessagesBody
Examples
use twitch_api::helix::moderation::ManageHeldAutoModMessagesBody;
let body = ManageHeldAutoModMessagesBody::new("1234", "5678", true);
Trait Implementations
sourceimpl<'a> Clone for ManageHeldAutoModMessagesBody<'a>
impl<'a> Clone for ManageHeldAutoModMessagesBody<'a>
sourcefn clone(&self) -> ManageHeldAutoModMessagesBody<'a>
fn clone(&self) -> ManageHeldAutoModMessagesBody<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for ManageHeldAutoModMessagesBody<'a>
impl<'a> Debug for ManageHeldAutoModMessagesBody<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for ManageHeldAutoModMessagesBody<'a>
impl<'de: 'a, 'a> Deserialize<'de> for ManageHeldAutoModMessagesBody<'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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> PartialEq<ManageHeldAutoModMessagesBody<'a>> for ManageHeldAutoModMessagesBody<'a>
impl<'a> PartialEq<ManageHeldAutoModMessagesBody<'a>> for ManageHeldAutoModMessagesBody<'a>
sourcefn eq(&self, other: &ManageHeldAutoModMessagesBody<'a>) -> bool
fn eq(&self, other: &ManageHeldAutoModMessagesBody<'a>) -> bool
sourceimpl<'a> Serialize for ManageHeldAutoModMessagesBody<'a>
impl<'a> Serialize for ManageHeldAutoModMessagesBody<'a>
impl<'a> Eq for ManageHeldAutoModMessagesBody<'a>
impl<'a> StructuralEq for ManageHeldAutoModMessagesBody<'a>
impl<'a> StructuralPartialEq for ManageHeldAutoModMessagesBody<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ManageHeldAutoModMessagesBody<'a>
impl<'a> Send for ManageHeldAutoModMessagesBody<'a>
impl<'a> Sync for ManageHeldAutoModMessagesBody<'a>
impl<'a> Unpin for ManageHeldAutoModMessagesBody<'a>
impl<'a> UnwindSafe for ManageHeldAutoModMessagesBody<'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
Mutably borrows from an owned value. Read more
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
Compare self to
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>
Available on crate feature
helix
only.Create the body