pub struct ContextMenuItem<C> { /* private fields */ }Expand description
A clickable item in the session context menu.
The type parameter C determines whether this item operates on a single
entry (SingleEntryContext) or multiple entries (MultiEntryContext).
use powhttp_sdk::{ContextMenuItemSingle, ExtensionHandle, SingleEntryContext, Error};
let item = ContextMenuItemSingle::new(
"copy-url",
"Copy URL",
async |ctx: SingleEntryContext, handle: ExtensionHandle| {
// handler logic here
Ok(())
},
);Implementations§
Trait Implementations§
Source§impl<C> From<ContextMenuItem<C>> for ContextMenuNode<C>
impl<C> From<ContextMenuItem<C>> for ContextMenuNode<C>
Source§fn from(item: ContextMenuItem<C>) -> Self
fn from(item: ContextMenuItem<C>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> !RefUnwindSafe for ContextMenuItem<C>
impl<C> !UnwindSafe for ContextMenuItem<C>
impl<C> Freeze for ContextMenuItem<C>
impl<C> Send for ContextMenuItem<C>
impl<C> Sync for ContextMenuItem<C>
impl<C> Unpin for ContextMenuItem<C>
impl<C> UnsafeUnpin for ContextMenuItem<C>
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