pub struct EditorZoneHitTest {
pub zone: EditorHitZone,
pub byte: usize,
}Expand description
Hit result including semantic zone and source byte.
§Examples
use ailloli_ui_editor::{EditorHitZone, EditorZoneHitTest};
let hit = EditorZoneHitTest { zone: EditorHitZone::Outside, byte: 10 };
assert_eq!((hit.zone, hit.byte), (EditorHitZone::Outside, 10));Fields§
§zone: EditorHitZoneText, gutter, or outside classification.
byte: usizeSource-buffer byte; outside hits use buffer_len_bytes.
Trait Implementations§
Source§impl Clone for EditorZoneHitTest
impl Clone for EditorZoneHitTest
Source§fn clone(&self) -> EditorZoneHitTest
fn clone(&self) -> EditorZoneHitTest
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EditorZoneHitTest
impl Debug for EditorZoneHitTest
Source§impl PartialEq for EditorZoneHitTest
impl PartialEq for EditorZoneHitTest
impl Copy for EditorZoneHitTest
impl Eq for EditorZoneHitTest
impl StructuralPartialEq for EditorZoneHitTest
Auto Trait Implementations§
impl Freeze for EditorZoneHitTest
impl RefUnwindSafe for EditorZoneHitTest
impl Send for EditorZoneHitTest
impl Sync for EditorZoneHitTest
impl Unpin for EditorZoneHitTest
impl UnwindSafe for EditorZoneHitTest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.