beginning actual app
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user