pub enum ElementId {
View(EntityId),
Integer(u64),
Name(SharedString),
Uuid(Uuid),
FocusHandle(FocusId),
NamedInteger(SharedString, u64),
Path(Arc<Path>),
CodeLocation(Location<'static>),
NamedChild(Arc<ElementId>, SharedString),
OpaqueId([u8; 20]),
}Expand description
重导出窗口系统类型
Element 的标识符。
可以用字符串、数字或两者构造,以及其他内部表示。
Variants§
View(EntityId)
视图元素的 ID
Integer(u64)
整数 ID。
Name(SharedString)
基于字符串的 ID。
Uuid(Uuid)
UUID。
FocusHandle(FocusId)
与焦点句柄等同的 ID。
NamedInteger(SharedString, u64)
名称和整数的组合。
Path(Arc<Path>)
路径。
CodeLocation(Location<'static>)
代码位置。
NamedChild(Arc<ElementId>, SharedString)
元素的带标签子元素。
OpaqueId([u8; 20])
字节数组 ID(用于文本锚点)
Implementations§
Source§impl ElementId
impl ElementId
Sourcepub fn named_usize(name: impl Into<SharedString>, integer: usize) -> ElementId
pub fn named_usize(name: impl Into<SharedString>, integer: usize) -> ElementId
从名称和 usize 构造 ElementId::NamedInteger。
Trait Implementations§
impl Eq for ElementId
Source§impl<'a> From<&'a FocusHandle> for ElementId
impl<'a> From<&'a FocusHandle> for ElementId
Source§fn from(handle: &'a FocusHandle) -> Self
fn from(handle: &'a FocusHandle) -> Self
Converts to this type from the input type.
Source§fn from((name, id): (SharedString, usize)) -> Self
fn from((name, id): (SharedString, usize)) -> Self
Converts to this type from the input type.
Source§fn from(name: SharedString) -> Self
fn from(name: SharedString) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ElementId
Auto Trait Implementations§
impl Forget for ElementId
impl Freeze for ElementId
impl Move for ElementId
impl RefUnwindSafe for ElementId
impl Send for ElementId
impl Sync for ElementId
impl Unpin for ElementId
impl UnsafeUnpin for ElementId
impl UnwindSafe for ElementId
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,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more