Trait modalkit::editing::application::ApplicationInfo
source · pub trait ApplicationInfo: Clone + Debug + Eq + PartialEq {
type Error: ApplicationError;
type Action: ApplicationAction;
type Store: ApplicationStore;
type WindowId: ApplicationWindowId;
type ContentId: ApplicationContentId;
// Required method
fn content_of_command(cmdtype: CommandType) -> Self::ContentId;
// Provided method
fn complete(
text: &EditRope,
cursor: &mut Cursor,
content: &Self::ContentId,
store: &mut Store<Self>
) -> Vec<String> { ... }
}
Expand description
Trait for objects that describe application-specific behaviour and types.
Required Associated Types§
sourcetype Error: ApplicationError
type Error: ApplicationError
An application-specific error type.
sourcetype Action: ApplicationAction
type Action: ApplicationAction
The type for application-specific actions.
sourcetype Store: ApplicationStore
type Store: ApplicationStore
The type for application-specific storage.
sourcetype WindowId: ApplicationWindowId
type WindowId: ApplicationWindowId
The type for application-specific windows.
sourcetype ContentId: ApplicationContentId
type ContentId: ApplicationContentId
The type for application-specific content within a window.
Required Methods§
sourcefn content_of_command(cmdtype: CommandType) -> Self::ContentId
fn content_of_command(cmdtype: CommandType) -> Self::ContentId
Get the ApplicationContentId used to show a given command type.
Provided Methods§
Object Safety§
This trait is not object safe.