pub enum CommandField {
String(String),
Array(Vec<String>),
}Expand description
MCP command field — accepts either a string or an array of strings.
OpenCode’s config format supports both:
"command": "npx"with"args": ["-y", "some-pkg"]"command": ["npx", "-y", "some-pkg"](shorthand without separate args)
Variants§
Trait Implementations§
Source§impl Clone for CommandField
impl Clone for CommandField
Source§fn clone(&self) -> CommandField
fn clone(&self) -> CommandField
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 moreSource§impl Debug for CommandField
impl Debug for CommandField
Source§impl<'de> Deserialize<'de> for CommandField
impl<'de> Deserialize<'de> for CommandField
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 CommandField
impl PartialEq for CommandField
Source§fn eq(&self, other: &CommandField) -> bool
fn eq(&self, other: &CommandField) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CommandField
impl Serialize for CommandField
impl StructuralPartialEq for CommandField
Auto Trait Implementations§
impl Freeze for CommandField
impl RefUnwindSafe for CommandField
impl Send for CommandField
impl Sync for CommandField
impl Unpin for CommandField
impl UnsafeUnpin for CommandField
impl UnwindSafe for CommandField
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