pub struct Workbench {
pub id: &'static str,
pub label: &'static str,
pub glyph: &'static str,
pub includes: fn(&FeatureInfo<'_>) -> bool,
pub buttons: &'static [WorkbenchButton],
pub panels: &'static [&'static str],
}Expand description
One workbench: a UI filter + optional toolbar buttons + claimed panels. Fully
'static — fn-pointer predicate and &'static slices, no OnceLock.
Fields§
§id: &'static strStable id, e.g. "all" / "modeling" / "sheetMetal" — the value stored
in RenderSettings.workbench and published to the verifier.
label: &'static strHuman label for the dropdown, e.g. "Sheet Metal".
glyph: &'static strSVG catalog key used by the workbench switcher.
includes: fn(&FeatureInfo<'_>) -> boolThis workbench OWNS its inclusion decision: does a catalogue entry belong in this workbench’s feature-creation UI?
Extra toolbar buttons this workbench adds (data only). EMPTY in v1.
panels: &'static [&'static str]Ids of EXISTING panels this workbench CLAIMS. Claim-based, not hide-based:
a panel is visible unless it is claimed by ≥1 workbench and the active one
does not list it (see panel_visible). EMPTY in v1 (nothing claimed →
every panel visible everywhere). Phase 2 adds claims here, editing NO other
file — the same anti-rot property the button union gives.
Auto Trait Implementations§
impl Freeze for Workbench
impl RefUnwindSafe for Workbench
impl Send for Workbench
impl Sync for Workbench
impl Unpin for Workbench
impl UnsafeUnpin for Workbench
impl UnwindSafe for Workbench
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more