pub struct ClaudeModelModule;Expand description
Module that displays the current Claude model name
Renders the Claude model information with automatic compaction for version numbers (e.g., “Opus 4.1” → “Opus4.1”) and customizable symbol prefix.
§Configuration
[claude_model]
format = "[$symbol$model]($style)"
style = "bold yellow"
symbol = "<"
disabled = false§Display Rules
- Compacts spaces before digits (e.g., “Sonnet 3.5” → “Sonnet3.5”)
- Only displays when model name is non-empty
- Can be disabled via configuration
Implementations§
Source§impl ClaudeModelModule
impl ClaudeModelModule
Sourcepub fn from_context(_context: &Context) -> Self
pub fn from_context(_context: &Context) -> Self
Create from Context (kept for compatibility)
Trait Implementations§
Source§impl Default for ClaudeModelModule
impl Default for ClaudeModelModule
Source§impl Module for ClaudeModelModule
impl Module for ClaudeModelModule
Source§fn should_display(&self, context: &Context, config: &dyn ModuleConfig) -> bool
fn should_display(&self, context: &Context, config: &dyn ModuleConfig) -> bool
Determines if this module should be displayed
Auto Trait Implementations§
impl Freeze for ClaudeModelModule
impl RefUnwindSafe for ClaudeModelModule
impl Send for ClaudeModelModule
impl Sync for ClaudeModelModule
impl Unpin for ClaudeModelModule
impl UnsafeUnpin for ClaudeModelModule
impl UnwindSafe for ClaudeModelModule
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> 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