pub struct Snapshot {
pub format_version: u32,
pub meta: SnapshotMeta,
pub tool_catalog: Vec<ToolInfo>,
pub exchanges: Vec<Exchange>,
}Fields§
§format_version: u32§meta: SnapshotMeta§tool_catalog: Vec<ToolInfo>§exchanges: Vec<Exchange>Implementations§
Source§impl Snapshot
impl Snapshot
pub fn new(server_name: String, server_version: String) -> Self
pub fn add_tool(&mut self, tool: ToolInfo)
pub fn add_exchange( &mut self, tool: String, input: Value, result: ExchangeResult, )
pub fn save(&self, path: &str) -> Result<()>
pub fn load(path: &str) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
Source§fn 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
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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