pub enum EventKind<'a> {
Show 17 variants
Favorite(Box<Tweet<'a>>),
Unfavorite(Box<Tweet<'a>>),
ListCreated(Box<List<'a>>),
ListDestroyed(Box<List<'a>>),
ListUpdated(Box<List<'a>>),
ListMemberAdded(Box<List<'a>>),
ListMemberRemoved(Box<List<'a>>),
ListUserSubscribed(Box<List<'a>>),
ListUserUnsubscribed(Box<List<'a>>),
QuotedTweet(Box<Tweet<'a>>),
AccessRevoked,
Block,
Unblock,
Follow,
Unfollow,
UserUpdate,
Custom(Cow<'a, str>, Option<JsonValue>),
}Expand description
An object which indicates the name of an event. It may contain an object called “target object” which represents the target of the event.
The meaning of target and source field of an Event will
be different based on the name of the event, as described below.
| Description | Event Name | source | target |
|---|---|---|---|
| User deauthorizes stream | AccessRevoked | Deauthorizing user | App owner |
| User blocks someone | Block | Current user | Blocked user |
| User removes a block | Unblock | Current user | Unblocked user |
| User favorites a Tweet | Favorite | Current user | Tweet author |
| User’s Tweet is favorited | Favorite | Favoriting user | Current user |
| User unfavorites a Tweet | Unfavorite | Current user | Tweet author |
| User’s Tweet is unfavorited | Unfavorite | Unfavoriting user | Current user |
| User follows someone | Follow | Current user | Followed user |
| User is followed | Follow | Following user | Current user |
| User unfollows someone | Unfollow | Current user | Followed user |
| User creates a list | ListCreated | Current user | Current user |
| User deletes a list | ListDestroyed | Current user | Current user |
| User edits a list | ListUpdated | Current user | Current user |
| User adds someone to a list | ListMemberAdded | Current user | Added user |
| User is added to a list | ListMemberAdded | Adding user | Current user |
| User removes someone from a list | ListMemberRemoved | Current user | Removed user |
| User is removed from a list | ListMemberRemoved | Removing user | Current user |
| User subscribes to a list | ListUserSubscribed | Current user | List owner |
| User’s list is subscribed to | ListUserSubscribed | Subscribing user | Current user |
| User unsubscribes from a list | ListUserUnsubscribed | Current user | List owner |
| User’s list is unsubscribed from | ListUserUnsubscribed | Unsubscribing user | Current user |
| User’s Tweet is quoted | QuotedTweet | quoting User | Current User |
| User updates their profile | UserUpdate | Current user | Current user |
| User updates their protected status | UserUpdate | Current user | Current user |
Variants§
Favorite(Box<Tweet<'a>>)
Unfavorite(Box<Tweet<'a>>)
ListCreated(Box<List<'a>>)
ListDestroyed(Box<List<'a>>)
ListUpdated(Box<List<'a>>)
ListMemberAdded(Box<List<'a>>)
ListMemberRemoved(Box<List<'a>>)
ListUserSubscribed(Box<List<'a>>)
ListUserUnsubscribed(Box<List<'a>>)
QuotedTweet(Box<Tweet<'a>>)
AccessRevoked
Block
Unblock
Follow
Unfollow
UserUpdate
Custom(Cow<'a, str>, Option<JsonValue>)
An event this library does not know. The first value is raw event name and the second is the target object.
Trait Implementations§
impl<'a> StructuralPartialEq for EventKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for EventKind<'a>
impl<'a> RefUnwindSafe for EventKind<'a>
impl<'a> Send for EventKind<'a>
impl<'a> Sync for EventKind<'a>
impl<'a> Unpin for EventKind<'a>
impl<'a> UnwindSafe for EventKind<'a>
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