pub struct FragmentHit<FragmentId: Copy> {
pub fragment: FragmentId,
pub source_node: SourceNodeId,
pub local_point: Point,
}Expand description
What hit_test returns. Carries the lane’s fragment id, the
containing source node, and the local hit point inside the
fragment (so consumers can drive caret positioning without
re-walking).
Fields§
§fragment: FragmentId§source_node: SourceNodeId§local_point: PointHit point in the fragment’s local space (origin at the fragment’s top-left).
Trait Implementations§
Source§impl<FragmentId: Clone + Copy> Clone for FragmentHit<FragmentId>
impl<FragmentId: Clone + Copy> Clone for FragmentHit<FragmentId>
Source§fn clone(&self) -> FragmentHit<FragmentId>
fn clone(&self) -> FragmentHit<FragmentId>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<FragmentId: Copy + Copy> Copy for FragmentHit<FragmentId>
Source§impl<'de, FragmentId> Deserialize<'de> for FragmentHit<FragmentId>where
FragmentId: Deserialize<'de> + Copy,
impl<'de, FragmentId> Deserialize<'de> for FragmentHit<FragmentId>where
FragmentId: Deserialize<'de> + Copy,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<FragmentId> MallocSizeOf for FragmentHit<FragmentId>where
FragmentId: MallocSizeOf + Copy,
impl<FragmentId> MallocSizeOf for FragmentHit<FragmentId>where
FragmentId: MallocSizeOf + Copy,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<FragmentId> Serialize for FragmentHit<FragmentId>
impl<FragmentId> Serialize for FragmentHit<FragmentId>
impl<FragmentId: PartialEq + Copy> StructuralPartialEq for FragmentHit<FragmentId>
Auto Trait Implementations§
impl<FragmentId> Freeze for FragmentHit<FragmentId>where
FragmentId: Freeze,
impl<FragmentId> RefUnwindSafe for FragmentHit<FragmentId>where
FragmentId: RefUnwindSafe,
impl<FragmentId> Send for FragmentHit<FragmentId>where
FragmentId: Send,
impl<FragmentId> Sync for FragmentHit<FragmentId>where
FragmentId: Sync,
impl<FragmentId> Unpin for FragmentHit<FragmentId>where
FragmentId: Unpin,
impl<FragmentId> UnsafeUnpin for FragmentHit<FragmentId>where
FragmentId: UnsafeUnpin,
impl<FragmentId> UnwindSafe for FragmentHit<FragmentId>where
FragmentId: UnwindSafe,
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert