pub trait ProgramCollect {
type Enum;
type DispatcherNotFound: Groupped<Self::Enum>;
type RendererNotFound: Groupped<Self::Enum>;
type EmptyResult: Groupped<Self::Enum>;
// Required methods
fn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput<Self::Enum>;
fn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>;
fn build_empty_result() -> AnyOutput<Self::Enum>;
fn render(any: AnyOutput<Self::Enum>, r: &mut RenderResult);
fn render_help(any: AnyOutput<Self::Enum>, r: &mut RenderResult);
fn do_chain(any: AnyOutput<Self::Enum>) -> ChainProcess<Self::Enum>;
fn do_comp(any: &AnyOutput<Self::Enum>, ctx: &ShellContext) -> Suggest;
fn has_renderer(any: &AnyOutput<Self::Enum>) -> bool;
fn has_chain(any: &AnyOutput<Self::Enum>) -> bool;
fn general_render(
any: AnyOutput<Self::Enum>,
setting: &GeneralRendererSetting,
) -> Result<RenderResult, GeneralRendererSerializeError>;
}Expand description
Collected program context
Note: It is recommended to use the gen_program!() macro from mingling_macros to automatically create this type
Required Associated Types§
type DispatcherNotFound: Groupped<Self::Enum>
type RendererNotFound: Groupped<Self::Enum>
type EmptyResult: Groupped<Self::Enum>
Required Methods§
Sourcefn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput<Self::Enum>
fn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput<Self::Enum>
Build an AnyOutput to indicate that a renderer was not found
Sourcefn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>
fn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>
Build an AnyOutput to indicate that a dispatcher was not found
Sourcefn build_empty_result() -> AnyOutput<Self::Enum>
fn build_empty_result() -> AnyOutput<Self::Enum>
Build an AnyOutput to indicate that the chain returned an empty result
Sourcefn render_help(any: AnyOutput<Self::Enum>, r: &mut RenderResult)
fn render_help(any: AnyOutput<Self::Enum>, r: &mut RenderResult)
Render help for Entry
Sourcefn do_comp(any: &AnyOutput<Self::Enum>, ctx: &ShellContext) -> Suggest
fn do_comp(any: &AnyOutput<Self::Enum>, ctx: &ShellContext) -> Suggest
Match and execute specific completion logic based on any Entry
Sourcefn has_renderer(any: &AnyOutput<Self::Enum>) -> bool
fn has_renderer(any: &AnyOutput<Self::Enum>) -> bool
Whether the program has a renderer that can handle the current AnyOutput
Sourcefn has_chain(any: &AnyOutput<Self::Enum>) -> bool
fn has_chain(any: &AnyOutput<Self::Enum>) -> bool
Whether the program has a chain that can handle the current AnyOutput
Sourcefn general_render(
any: AnyOutput<Self::Enum>,
setting: &GeneralRendererSetting,
) -> Result<RenderResult, GeneralRendererSerializeError>
fn general_render( any: AnyOutput<Self::Enum>, setting: &GeneralRendererSetting, ) -> Result<RenderResult, GeneralRendererSerializeError>
Perform general rendering and presentation of any type
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.