beginning actual app

This commit is contained in:
2025-11-11 01:35:59 -05:00
parent 379eec771a
commit 92db1264a6
3 changed files with 32 additions and 23 deletions

View File

@@ -217,18 +217,34 @@ impl<W> Clone for StaticWidgetId<W> {
impl<W> Copy for StaticWidgetId<W> {}
pub trait IdLike<W> {
pub trait WidgetIdLike<W> {
fn id(self, send: &Sender<Id>) -> WidgetId<W>;
}
impl<W> IdLike<W> for &WidgetId<W> {
impl<W> WidgetIdLike<W> for &WidgetId<W> {
fn id(self, _: &Sender<Id>) -> WidgetId<W> {
self.clone()
}
}
impl<W> IdLike<W> for StaticWidgetId<W> {
impl<W> WidgetIdLike<W> for StaticWidgetId<W> {
fn id(self, send: &Sender<Id>) -> WidgetId<W> {
self.to_id(send)
}
}
pub trait IdLike<W> {
fn id(&self) -> Id;
}
impl<W> IdLike<W> for WidgetId<W> {
fn id(&self) -> Id {
self.id
}
}
impl<W> IdLike<W> for StaticWidgetId<W> {
fn id(&self) -> Id {
self.id
}
}