pub struct PluginSharedState {
pub cells: Vec<Cell>,
pub cols: u16,
pub rows: u16,
pub cursor: (u16, u16),
pub env: HashMap<String, String>,
pub data: HashMap<String, String>,
pub commands: Vec<ModalItem>,
}Expand description
Shared state accessible to plugins
This wraps the protocol’s SharedState with a simpler interface for plugins. The protocol’s SharedState uses #[repr(C)] for IPC, while this one provides a high-level API for plugin development.
Fields§
§cells: Vec<Cell>Terminal grid cells
cols: u16Grid width in columns
rows: u16Grid rows
cursor: (u16, u16)Current cursor position
env: HashMap<String, String>Environment variables
data: HashMap<String, String>Custom plugin-specific data storage
commands: Vec<ModalItem>Aggregated list of commands from all plugins
Implementations§
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.