pub struct EventView<'a> { /* private fields */ }Implementations§
Source§impl<'a> EventView<'a>
impl<'a> EventView<'a>
Sourcepub unsafe fn from_raw(raw: &'a StablePluginEvent) -> Self
pub unsafe fn from_raw(raw: &'a StablePluginEvent) -> Self
Create a view at an ABI callback boundary.
§Safety
The host must initialize the payload variant specified by tag and
keep every payload buffer valid until the callback returns. The view
borrows the event; accessors copy strings and never free host memory.
pub fn tag(&self) -> EventTag
pub fn message_text(&self) -> Option<String>
pub fn data_text(&self) -> Option<String>
pub fn tool_call(&self) -> Option<ToolCall>
pub fn tool_result(&self) -> Option<ToolResult>
Auto Trait Implementations§
impl<'a> Freeze for EventView<'a>
impl<'a> RefUnwindSafe for EventView<'a>
impl<'a> Send for EventView<'a>
impl<'a> Sync for EventView<'a>
impl<'a> Unpin for EventView<'a>
impl<'a> UnsafeUnpin for EventView<'a>
impl<'a> UnwindSafe for EventView<'a>
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