Enum twitch_api::pubsub::automod_queue::Fragment
source · [−]#[non_exhaustive]
pub enum Fragment {
AutomodFragment {
text: String,
automod: Automod,
},
TextFragment {
text: String,
},
UserMention {
text: String,
user_mention: FragmentUserMention,
},
}
Available on crate feature
pubsub
only.Expand description
A fragment of a AutoModded message
Can either be regular text, or classified as part of the reason for AutoMod
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AutomodFragment
Fields
text: String
Text associated with this fragment
automod: Automod
AutoMod classification of the fragment
Fragment that is classified under a AutoMod category which is being filtered out
TextFragment
Fields
text: String
Text associated with this fragment
Fragment that is not classified under a AutoMod category
UserMention
Fields
text: String
Text associated with this fragment
user_mention: FragmentUserMention
User mentioned
A text fragment that mentions another user
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Fragment
impl<'de> Deserialize<'de> for Fragment
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
impl Eq for Fragment
impl StructuralEq for Fragment
impl StructuralPartialEq for Fragment
Auto Trait Implementations
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnwindSafe for Fragment
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.