pub struct PmiTypeDef {
pub type_id: &'static str,
pub short_name: &'static str,
pub icon: &'static str,
pub long_name: &'static str,
pub label: &'static str,
pub applicable: fn(&SelectionProbe) -> bool,
pub schema: fn() -> Value,
pub resolve: fn(&PmiAnnotation, &PmiContext<'_>) -> Result<Resolved, String>,
}Expand description
One annotation type.
Fields§
§type_id: &'static strCanonical type string (the persisted key).
short_name: &'static strId-mint prefix (DIM → DIM3).
icon: &'static strThe type’s ONE icon — a catalogued glyph character (the app’s
assets/glyphs set). Every surface that stands for the type by picture
(tree row, viewport chip, context offer) reads this.
long_name: &'static str"{icon} {label}".
label: &'static strPlain label for messages and the tree.
applicable: fn(&SelectionProbe) -> boolDoes the current selection make creating this annotation meaningful?
schema: fn() -> ValueThe annotation’s schema ({type, shortName, longName, label, icon, inputParamsSchema}), the shape the dialog engine consumes.
resolve: fn(&PmiAnnotation, &PmiContext<'_>) -> Result<Resolved, String>Resolve the annotation against the scene.
Auto Trait Implementations§
impl Freeze for PmiTypeDef
impl RefUnwindSafe for PmiTypeDef
impl Send for PmiTypeDef
impl Sync for PmiTypeDef
impl Unpin for PmiTypeDef
impl UnsafeUnpin for PmiTypeDef
impl UnwindSafe for PmiTypeDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more