Name a type's live spelling beside its static one

This commit is contained in:
Dennis Kobert
2026-09-14 12:09:37 +02:00
parent 0a4288eca6
commit 781aef5f2e
7 changed files with 159 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
use core_types::transform::Footprint;
use dyn_any::{DynAny, StaticType, StaticTypeSized};
use dyn_any::DynAny;
use glam::DVec2;
use std::fmt::Debug;
use std::hash::{Hash, Hasher};
@@ -106,6 +106,8 @@ impl GetEditorPreferences for DummyPreferences {
}
}
#[derive(dyn_any::DynAny)]
#[dyn_any_derive(project)]
pub struct EditorApi<Io> {
/// Gives access to APIs like resources.
pub application_io: Option<Arc<Io>>,
@@ -155,7 +157,3 @@ impl<T> Debug for EditorApi<T> {
f.debug_struct("EditorApi").finish()
}
}
unsafe impl<T: StaticTypeSized> StaticType for EditorApi<T> {
type Static = EditorApi<T::Static>;
}