feat(core): format handles for templates
Implement Display for generated Handle<T> values and migrate example view data to carry handles directly instead of raw handle id numbers for dynamic handle attributes. req: public_api/001 req: public_api/002
This commit is contained in:
@@ -896,6 +896,12 @@ impl<I> Handle<I> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<I> core::fmt::Display for Handle<I> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
self.id.id.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait FormValue {}
|
||||
|
||||
impl<T> FormValue for T where T: std::str::FromStr {}
|
||||
|
||||
Reference in New Issue
Block a user