pub struct Subscription {
pub id: SubscriptionId,
pub event_types: Vec<EventTypeName>,
pub created_at: u64,
pub active: bool,
}Expand description
订阅句柄
用于管理订阅生命周期。
Fields§
§id: SubscriptionId订阅 ID
event_types: Vec<EventTypeName>订阅的事件类型
created_at: u64订阅时间
active: bool是否激活
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn new(id: SubscriptionId, event_types: Vec<EventTypeName>) -> Self
pub fn new(id: SubscriptionId, event_types: Vec<EventTypeName>) -> Self
创建新的订阅
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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