pub enum NotifyChange<M> {
Appended(M),
Updated {
index: usize,
old: M,
new: M,
},
Inserted {
index: usize,
message: M,
},
Removed {
index: usize,
message: M,
},
Popped(M),
Retained {
role: Role,
removed: Vec<M>,
},
Cleared {
removed: Vec<M>,
},
Loaded {
messages: Vec<M>,
},
}Expand description
incremental 区的变更通知,通过 RequestSubscribeChange 注册的订阅者接收。
Variants§
Appended(M)
追加了一条消息
Updated
更新了指定索引的消息,同时给出旧值和新值
Inserted
在指定索引插入了消息
Removed
移除了指定索引的消息
Popped(M)
弹出了最后一条消息
Retained
按角色保留,其余消息被移除
Cleared
清空了整个 incremental 区
Loaded
从 JSONL 批量加载消息替换了 incremental 区
Trait Implementations§
Source§impl<M: Clone> Clone for NotifyChange<M>
impl<M: Clone> Clone for NotifyChange<M>
Source§fn clone(&self) -> NotifyChange<M>
fn clone(&self) -> NotifyChange<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<M> Freeze for NotifyChange<M>where
M: Freeze,
impl<M> RefUnwindSafe for NotifyChange<M>where
M: RefUnwindSafe,
impl<M> Send for NotifyChange<M>where
M: Send,
impl<M> Sync for NotifyChange<M>where
M: Sync,
impl<M> Unpin for NotifyChange<M>where
M: Unpin,
impl<M> UnsafeUnpin for NotifyChange<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for NotifyChange<M>where
M: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
Handles the dyn message with the provided actor state, ref, and reply sender.