pub trait ShellConfig {
const MAX_INPUT: usize;
const MAX_PATH_DEPTH: usize;
const MAX_ARGS: usize;
const MAX_PROMPT: usize;
const MAX_RESPONSE: usize;
const HISTORY_SIZE: usize;
const MSG_WELCOME: &'static str;
const MSG_LOGIN_PROMPT: &'static str;
const MSG_LOGIN_SUCCESS: &'static str;
const MSG_LOGIN_FAILED: &'static str;
const MSG_LOGOUT: &'static str;
const MSG_INVALID_LOGIN_FORMAT: &'static str;
}Expand description
Shell configuration trait defining buffer sizes and capacity limits.
All values are const (zero runtime cost). Due to Rust’s const generics limitations
(const trait bounds not yet stable), internal buffers use hardcoded sizes from
DefaultConfig rather than C::MAX_INPUT, etc. The trait establishes the API
contract for when const generics stabilize.
Currently customizable: MSG_* strings only.
Not yet customizable: Buffer size constants (hardcoded to DefaultConfig values).
Required Associated Constants§
Sourceconst MAX_PATH_DEPTH: usize
const MAX_PATH_DEPTH: usize
Maximum path depth (default: 8)
Sourceconst MAX_PROMPT: usize
const MAX_PROMPT: usize
Maximum prompt length (default: 64)
Sourceconst MAX_RESPONSE: usize
const MAX_RESPONSE: usize
Maximum response message length (default: 256)
Sourceconst HISTORY_SIZE: usize
const HISTORY_SIZE: usize
Command history size (default: 10)
Sourceconst MSG_WELCOME: &'static str
const MSG_WELCOME: &'static str
Welcome message shown on activation
Sourceconst MSG_LOGIN_PROMPT: &'static str
const MSG_LOGIN_PROMPT: &'static str
Login prompt
Sourceconst MSG_LOGIN_SUCCESS: &'static str
const MSG_LOGIN_SUCCESS: &'static str
Login success message
Sourceconst MSG_LOGIN_FAILED: &'static str
const MSG_LOGIN_FAILED: &'static str
Login failed message
Sourceconst MSG_LOGOUT: &'static str
const MSG_LOGOUT: &'static str
Logout message
Sourceconst MSG_INVALID_LOGIN_FORMAT: &'static str
const MSG_INVALID_LOGIN_FORMAT: &'static str
Invalid login format message
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.