Start work on following in zed2
Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
71a1125e88
commit
eff3a72fb5
4 changed files with 245 additions and 167 deletions
|
@ -2708,6 +2708,7 @@ pub enum ElementId {
|
|||
Integer(usize),
|
||||
Name(SharedString),
|
||||
FocusHandle(FocusId),
|
||||
NamedInteger(SharedString, usize),
|
||||
}
|
||||
|
||||
impl ElementId {
|
||||
|
@ -2757,3 +2758,9 @@ impl<'a> From<&'a FocusHandle> for ElementId {
|
|||
ElementId::FocusHandle(handle.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(&'static str, EntityId)> for ElementId {
|
||||
fn from((name, id): (&'static str, EntityId)) -> Self {
|
||||
ElementId::NamedInteger(name.into(), id.as_u64() as usize)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue