Skip to main content

ScratchOpts

Trait ScratchOpts 

Source
pub trait ScratchOpts {
    // Required method
    fn scratch(&self) -> Option<&str>;
}
Expand description

每轮刷新的临时元数据,通过 Opts 配置,发送时追加到消息列表末尾。

实现此 trait 的 Opts 类型提供一个 scratch 字段,内容在每次 SendMsg/SendStreamMsg 时作为 system 消息拼接到对话末尾。Scratch 不存储到任何区,每轮由调用方重新设置。

Required Methods§

Source

fn scratch(&self) -> Option<&str>

返回 scratch 内容。Some 时作为 system 消息追加;None 则不追加。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§