pub struct DebugConfig<C: BindingContext> {
pub keybindings: Keybindings<C>,
pub debug_context: C,
pub style: DebugStyle,
/* private fields */
}Expand description
Configuration for the debug layer
Fields§
§keybindings: Keybindings<C>Keybindings for debug commands
debug_context: CContext used for debug-specific bindings
style: DebugStyleStyle configuration
Implementations§
Source§impl<C: BindingContext> DebugConfig<C>
impl<C: BindingContext> DebugConfig<C>
Sourcepub fn new(keybindings: Keybindings<C>, debug_context: C) -> Self
pub fn new(keybindings: Keybindings<C>, debug_context: C) -> Self
Create a new config with keybindings and debug context
Sourcepub fn with_style(self, style: DebugStyle) -> Self
pub fn with_style(self, style: DebugStyle) -> Self
Set the style
Sourcepub fn with_status_provider<F>(self, provider: F) -> Self
pub fn with_status_provider<F>(self, provider: F) -> Self
Set a status provider function
This function is called each render to get status items for the banner.
Sourcepub fn status_items(&self) -> Vec<StatusItem>
pub fn status_items(&self) -> Vec<StatusItem>
Get status items from the provider (if any)
Trait Implementations§
Source§impl<C: Clone + BindingContext> Clone for DebugConfig<C>
impl<C: Clone + BindingContext> Clone for DebugConfig<C>
Source§fn clone(&self) -> DebugConfig<C>
fn clone(&self) -> DebugConfig<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<C> Freeze for DebugConfig<C>where
C: Freeze,
impl<C> !RefUnwindSafe for DebugConfig<C>
impl<C> Send for DebugConfig<C>where
C: Send,
impl<C> Sync for DebugConfig<C>where
C: Sync,
impl<C> Unpin for DebugConfig<C>where
C: Unpin,
impl<C> !UnwindSafe for DebugConfig<C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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