Struct proto_pdk_api::ToolContext
source · pub struct ToolContext {
pub proto_version: Option<Version>,
pub tool_dir: VirtualPath,
pub version: VersionSpec,
}
Expand description
Information about the current state of the tool.
Fields§
§proto_version: Option<Version>
The version of proto (the core crate) calling plugin functions.
tool_dir: VirtualPath
Virtual path to the tool’s installation directory.
version: VersionSpec
Current version. Will be a “latest” alias if not resolved.
Trait Implementations§
source§impl Clone for ToolContext
impl Clone for ToolContext
source§fn clone(&self) -> ToolContext
fn clone(&self) -> ToolContext
Returns a copy 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 moresource§impl Debug for ToolContext
impl Debug for ToolContext
source§impl Default for ToolContext
impl Default for ToolContext
source§fn default() -> ToolContext
fn default() -> ToolContext
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ToolContextwhere
ToolContext: Default,
impl<'de> Deserialize<'de> for ToolContextwhere
ToolContext: Default,
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
source§impl PartialEq for ToolContext
impl PartialEq for ToolContext
source§fn eq(&self, other: &ToolContext) -> bool
fn eq(&self, other: &ToolContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ToolContext
impl Serialize for ToolContext
impl StructuralPartialEq for ToolContext
Auto Trait Implementations§
impl Freeze for ToolContext
impl RefUnwindSafe for ToolContext
impl Send for ToolContext
impl Sync for ToolContext
impl Unpin for ToolContext
impl UnwindSafe for ToolContext
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