pub struct TreeItemDTO {
pub Handle: String,
pub ParentHandle: Option<String>,
pub Label: Option<Value>,
pub Description: Option<String>,
pub ResourceURI: Option<Value>,
pub Tooltip: Option<Value>,
pub Command: Option<Value>,
pub CollapsibleState: u32,
pub ContextValue: Option<String>,
pub Icon: Option<Value>,
pub ThemeIcon: Option<Value>,
pub CheckboxState: Option<Value>,
}Expand description
A serializable struct that represents a vscode.TreeItem.
This DTO is sent from Cocoon (where the TreeDataProvider logic lives)
to Mountain (where the UI state is managed) to describe how to render an
item in a tree view. It uses serde_json::Value for complex properties to
maintain flexibility and compatibility with the VS Code API.
Fields§
§Handle: StringA unique handle for this item within its tree view, generated by Cocoon.
ParentHandle: Option<String>The handle of the parent item, if any.
Label: Option<Value>The label for the tree item. Can be a simple string or a
TreeItemLabel object for highlighting.
Description: Option<String>A human-readable description for the tree item.
ResourceURI: Option<Value>The URI of the resource represented by this item. Serialized
UriComponents.
Tooltip: Option<Value>The tooltip to show when hovering over the item. Serialized string or
IMarkdownStringDTO.
Command: Option<Value>The command to execute when the item is selected. Serialized
CommandDTO.
CollapsibleState: u32The collapsible state of the item (e.g., None, Collapsed, Expanded).
Corresponds to vscode.TreeItemCollapsibleState.
ContextValue: Option<String>A string that can be used for context-menu visibility (when clauses).
Icon: Option<Value>A path to an icon or a light/dark pair of paths. Serialized
UriComponents.
ThemeIcon: Option<Value>A ThemeIcon identifier (e.g., ‘file-code’). Serialized ThemeIcon.
CheckboxState: Option<Value>The state of a checkbox displayed next to the tree item, if any.
Serialized CheckboxState.
Trait Implementations§
Source§impl Clone for TreeItemDTO
impl Clone for TreeItemDTO
Source§fn clone(&self) -> TreeItemDTO
fn clone(&self) -> TreeItemDTO
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TreeItemDTO
impl Debug for TreeItemDTO
Source§impl<'de> Deserialize<'de> for TreeItemDTO
impl<'de> Deserialize<'de> for TreeItemDTO
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>,
Auto Trait Implementations§
impl Freeze for TreeItemDTO
impl RefUnwindSafe for TreeItemDTO
impl Send for TreeItemDTO
impl Sync for TreeItemDTO
impl Unpin for TreeItemDTO
impl UnsafeUnpin for TreeItemDTO
impl UnwindSafe for TreeItemDTO
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more