pub struct TargetFindContext { /* private fields */ }Expand description
Current target context used for omitted targets and relative lookup.
Implementations§
Source§impl TargetFindContext
impl TargetFindContext
Sourcepub const fn new(current: Option<Target>) -> Self
pub const fn new(current: Option<Target>) -> Self
Creates a context with an optional current target.
Sourcepub fn from_target(target: Target) -> Self
pub fn from_target(target: Target) -> Self
Creates a context anchored to a concrete current target.
Sourcepub const fn current(&self) -> Option<&Target>
pub const fn current(&self) -> Option<&Target>
Returns the current target when one is available.
Sourcepub fn with_mouse_target(self, mouse_target: Option<Target>) -> Self
pub fn with_mouse_target(self, mouse_target: Option<Target>) -> Self
Returns a context extended with an active mouse target.
Sourcepub const fn mouse_target(&self) -> Option<&Target>
pub const fn mouse_target(&self) -> Option<&Target>
Returns the active mouse target when one is available.
Trait Implementations§
Source§impl Clone for TargetFindContext
impl Clone for TargetFindContext
Source§fn clone(&self) -> TargetFindContext
fn clone(&self) -> TargetFindContext
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 moreSource§impl Debug for TargetFindContext
impl Debug for TargetFindContext
Source§impl PartialEq for TargetFindContext
impl PartialEq for TargetFindContext
Source§fn eq(&self, other: &TargetFindContext) -> bool
fn eq(&self, other: &TargetFindContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TargetFindContext
impl StructuralPartialEq for TargetFindContext
Auto Trait Implementations§
impl Freeze for TargetFindContext
impl RefUnwindSafe for TargetFindContext
impl Send for TargetFindContext
impl Sync for TargetFindContext
impl Unpin for TargetFindContext
impl UnsafeUnpin for TargetFindContext
impl UnwindSafe for TargetFindContext
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