Struct proto_pdk_api::ToolContext
source · pub struct ToolContext {
pub env_vars: HashMap<String, String>,
pub tool_dir: VirtualPath,
pub version: String,
}Expand description
Information about the current state of the tool.
Fields§
§env_vars: HashMap<String, String>Requested environment variables. Only non-empty values are included.
tool_dir: VirtualPathVirtual path to the tool’s installation directory.
version: StringCurrent version. Will be empty 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 Eq for ToolContext
impl StructuralEq for ToolContext
impl StructuralPartialEq for ToolContext
Auto Trait Implementations§
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