pub struct InteractionTarget {
pub kind: InteractionTargetKind,
pub provenance: HitProvenance,
pub layer_id: Option<String>,
pub source_id: Option<String>,
pub source_layer: Option<String>,
pub source_tile: Option<TileId>,
pub feature_id: Option<String>,
pub feature_index: Option<usize>,
pub from_symbol: bool,
}Expand description
Stable identity and provenance for an interaction target.
Fields§
§kind: InteractionTargetKindBroad target class.
provenance: HitProvenanceHow the hit was resolved.
layer_id: Option<String>Style layer id or runtime layer name that produced the target.
source_id: Option<String>Style source id, when known.
source_layer: Option<String>Style source-layer id, when known.
source_tile: Option<TileId>Tile that supplied the feature, when known.
feature_id: Option<String>Stable feature id within the source.
feature_index: Option<usize>Source-local feature index.
from_symbol: boolWhether the hit came from a placed symbol collision box.
Implementations§
Source§impl InteractionTarget
impl InteractionTarget
Sourcepub fn from_pick_hit(hit: &PickHit) -> Self
pub fn from_pick_hit(hit: &PickHit) -> Self
Build an interaction target identity from a pick hit.
Sourcepub fn is_feature_backed(&self) -> bool
pub fn is_feature_backed(&self) -> bool
Whether the target resolves to a source feature identity.
Trait Implementations§
Source§impl Clone for InteractionTarget
impl Clone for InteractionTarget
Source§fn clone(&self) -> InteractionTarget
fn clone(&self) -> InteractionTarget
Returns a duplicate 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 InteractionTarget
impl Debug for InteractionTarget
Source§impl Hash for InteractionTarget
impl Hash for InteractionTarget
Source§impl PartialEq for InteractionTarget
impl PartialEq for InteractionTarget
impl Eq for InteractionTarget
impl StructuralPartialEq for InteractionTarget
Auto Trait Implementations§
impl Freeze for InteractionTarget
impl RefUnwindSafe for InteractionTarget
impl Send for InteractionTarget
impl Sync for InteractionTarget
impl Unpin for InteractionTarget
impl UnsafeUnpin for InteractionTarget
impl UnwindSafe for InteractionTarget
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