pub struct DragSession {
pub source: ElementId,
pub payload: DragPayload,
pub phase: DragPhase,
pub position: Point,
pub target: Option<ElementId>,
pub steps: u64,
}Expand description
一次拖拽会话。
Fields§
§source: ElementId发起拖拽的 element(owner);失效即视为取消。
payload: DragPayload§phase: DragPhase§position: Point当前指针位置(应用每次 update 注入)。
target: Option<ElementId>当前 hover 的 DropTarget element(若有)。
steps: u64累计 step 数(审计用:replay 两遍必须一致)。
Implementations§
Source§impl DragSession
impl DragSession
Sourcepub fn semantic_label(&self) -> String
pub fn semantic_label(&self) -> String
语义树 / 读屏器可播报的拖拽状态摘要。 不含指针坐标(避免每帧改变语义树),只含阶段、payload 类型与目标存在性。
Trait Implementations§
Source§impl Clone for DragSession
impl Clone for DragSession
Auto Trait Implementations§
impl !RefUnwindSafe for DragSession
impl !Send for DragSession
impl !Sync for DragSession
impl !UnwindSafe for DragSession
impl Forget for DragSession
impl Freeze for DragSession
impl Move for DragSession
impl Unpin for DragSession
impl UnsafeUnpin for DragSessionwhere
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const RcInner<dyn Any> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Any>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
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