pub struct MenuResolution {
pub text_match: Option<MenuTextMatch>,
pub anchor_key: NodeKey,
pub start_offset: usize,
pub end_offset: usize,
}Expand description
MenuResolution: what an open menu is anchored at. JS carries a
getRect over a DOM Range; here the anchor is the model range from
the trigger to the caret (anchor_key, UTF-16 offsets), which the view
measures. A node menu has no match and anchors at its node.
Fields§
§text_match: Option<MenuTextMatch>match.
anchor_key: NodeKeyThe text node the range is in, or the node a node menu is for.
start_offset: usize§end_offset: usizeTrait Implementations§
Source§impl Clone for MenuResolution
impl Clone for MenuResolution
Source§impl Debug for MenuResolution
impl Debug for MenuResolution
impl Eq for MenuResolution
Source§impl PartialEq for MenuResolution
impl PartialEq for MenuResolution
impl StructuralPartialEq for MenuResolution
Auto Trait Implementations§
impl Forget for MenuResolution
impl Freeze for MenuResolution
impl Move for MenuResolution
impl RefUnwindSafe for MenuResolution
impl Send for MenuResolution
impl Sync for MenuResolution
impl Unpin for MenuResolution
impl UnsafeUnpin for MenuResolution
impl UnwindSafe for MenuResolution
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