Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 44 fields pub version: u32, pub thinking_level: ThinkingLevel, pub theme: String, pub glyph_set: GlyphSet, pub default_model: Option<String>, pub default_provider: Option<String>, pub last_used_model: Option<String>, pub last_used_provider: Option<String>, pub max_tokens: Option<u32>, pub temperature: Option<f32>, pub default_temperature: Option<f64>, pub max_response_tokens: Option<usize>, pub session_history_size: usize, pub session_dir: Option<PathBuf>, pub extensions_enabled: bool, pub auto_compaction: bool, pub disabled_tools: Vec<String>, pub tool_timeout_seconds: u64, pub ask_timeout_secs: u64, pub extensions: Vec<String>, pub skills: Vec<String>, pub prompts: Vec<String>, pub themes: Vec<String>, pub custom_providers: Vec<CustomProvider>, pub dynamic_models: HashMap<String, Vec<String>>, pub keybindings: HashMap<String, Vec<String>>, pub edit_format: EditFormat, pub todo_panel_enabled: bool, pub todo_eager_mode: TodoEagerMode, pub todo_reminders_enabled: bool, pub todo_reminders_max: u32, pub todo_clear_delay_secs: i64, pub agent_hub_enabled: bool, pub snapcompact_enabled: bool, pub mermaid_render_enabled: bool, pub inline_images: bool, pub commit_tool_enabled: bool, pub bash_pty: bool, pub memory_enabled: bool, pub ttsr_enabled: bool, pub ttsr_interrupt_mode: String, pub model_roles: HashMap<String, String>, pub advisor: AdvisorSettings, pub hooks: Vec<HookSpec>,
}
Expand description

Application settings

Fields§

§version: u32

Settings format version. Used for automatic migration.

§thinking_level: ThinkingLevel

Thinking level for agent responses

§theme: String

Color theme — resolved by oxicode_vtui::theme (e.g. “oxi”, “oxide-dark”, “nord”).

§glyph_set: GlyphSet

Terminal glyph set — controls every UI symbol (status markers, list cursors, box drawing, spinners, icons).

unicode (default): box-drawing + emoji, works on any UTF-8 terminal. ascii: 7-bit fallback for serial consoles / CI logs. nerd: Nerd Font private-use codepoints (needs a patched font).

§default_model: Option<String>

Deprecated: use last_used_model instead. Kept for serde backward compat.

§default_provider: Option<String>

Deprecated: use last_used_provider instead. Kept for serde backward compat.

§last_used_model: Option<String>

Model selected by the user (last used = current default). Set during onboarding and updated every time the user switches model.

§last_used_provider: Option<String>

Provider for the last used model.

§max_tokens: Option<u32>

Max tokens for responses

§temperature: Option<f32>

Temperature for generation (0.0–2.0)

§default_temperature: Option<f64>

Default temperature as f64 (higher precision, takes precedence over temperature)

§max_response_tokens: Option<usize>

Maximum tokens for generation (usize variant, takes precedence over max_tokens)

§session_history_size: usize

Session history size (entries to keep in memory)

§session_dir: Option<PathBuf>

Directory for storing sessions (default: canonical home sessions/)

§extensions_enabled: bool

Whether extensions are enabled

§auto_compaction: bool

Whether to auto-compact conversations that exceed context window

§disabled_tools: Vec<String>

Built-in tools to disable (by name, e.g. ["web_search", "github_search"]). All tools are enabled by default; list tools here to turn them off.

§tool_timeout_seconds: u64

Timeout in seconds for tool execution

§ask_timeout_secs: u64

Ask overlay timeout in seconds. 0 = disabled (wait indefinitely). When timeout fires, auto-selects the recommended option (or first).

§extensions: Vec<String>

List of extension paths or npm package sources to load

§skills: Vec<String>

List of skill paths or npm package sources to load

§prompts: Vec<String>

List of prompt template paths to load

§themes: Vec<String>

List of theme paths to load

§custom_providers: Vec<CustomProvider>

Registered custom providers (loaded from [[custom_provider]] TOML sections).

§dynamic_models: HashMap<String, Vec<String>>

Cached model lists fetched from provider /models endpoints. Key is the provider name, value is a list of model IDs. Updated when API keys are entered in setup wizard or on demand.

§keybindings: HashMap<String, Vec<String>>

User-defined keybinding overrides. Format: { "ActionName": ["Ctrl+x", "Alt+y"] } Actions are matched case-insensitively. Declared here for config persistence; not currently consumed by the tui_vt host loop.

§edit_format: EditFormat

Per-channel output language for the TUI agent loop.

Maps a channel key (e.g. "response", "code_comment", Edit format for the edit tool.

str_replace (default): traditional find-and-replace. hashline: line-anchored patches with content-derived tags.

§todo_panel_enabled: bool

Enable the sticky todo panel in the TUI. Default: true.

§todo_eager_mode: TodoEagerMode

How strongly to auto-create a todo list on the first turn. Default: off.

§todo_reminders_enabled: bool

Remind the agent to finish open todos before it stops. Default: true.

§todo_reminders_max: u32

Max stop-time todo reminders per run. Default: 3.

§todo_clear_delay_secs: i64

Seconds after every todo closes before the HUD auto-clears. Default: 60; 0 = instant; negative disables clearing.

§agent_hub_enabled: bool

Enable the Agent Hub overlay (Ctrl+h / /agents). Default: true.

§snapcompact_enabled: bool

Enable the Snapcompact PNG-frame compactor. Default: false (experimental).

§mermaid_render_enabled: bool

Enable Mermaid diagram rendering in markdown. Default: true.

§inline_images: bool

Inline image previews in the TUI (kitty / iTerm2 graphics protocols). Kill-switch for terminals that misrender image escapes. Default: true.

§commit_tool_enabled: bool

Enable the Commit tool with optional LLM analysis. Default: false (opt-in, LLM cost).

§bash_pty: bool

Run the bash tool inside a real PTY so ANSI SGR color sequences survive in command output (F-9, audit 2026-08-24). Default: false.

Currently inert. The agent crate (oxicode-agent) cannot see cli settings today — ToolContext carries no settings field, and Settings::apply_env() is a no-op. The only live gate is the OXICODE_BASH_PTY=1 environment variable, which is checked directly in BashTool::execute. Setting bash_pty = true in your settings file is silently ignored and emits a one-time tracing::warn! at settings load. The field is reserved for the eventual cli→agent settings plumbing — once that ships, the setting will be respected automatically.

To opt in today: export OXICODE_BASH_PTY=1 in the environment before invoking oxicode.

§memory_enabled: bool

Enable session-spanning memory tools (retain/recall/reflect/edit) backed by the oxibrain daemon — the Oxi Foundation host’s only durable-memory authority. Default: true. Machines without the daemon degrade honestly (tools return typed unavailable results).

§ttsr_enabled: bool

Enable Time-Traveling Stream Rules (stream interrupt on rule violation). Default: false (opt-in, stable-first).

§ttsr_interrupt_mode: String

TTSR interrupt mode. Default: “prose_only”.

§model_roles: HashMap<String, String>

Named model-role → model-pattern assignments (e.g. "commit""anthropic/claude-haiku", "slow""pi/default").

Empty by default. Role names are open-ended: the 10 built-in roles (default/smol/slow/vision/plan/designer/commit/title/ task/advisor) plus any user-defined role are accepted. Resolution — including pi/<role> alias expansion with cycle detection — is done by oxicode_ai::RoleRegistry. The role-switching layer (which role is active when) is wired separately.

§advisor: AdvisorSettings

Advisor subsystem settings. Default OFF (opt-in). Drives the oxicode_agent::advisor engine wired into AgentSession.

§hooks: Vec<HookSpec>

User-configured event→shell-command hooks. Loaded from the [[hooks]] array in settings.toml. Project hooks are gated by the first-run approval (see store/hook_approval.rs).

Implementations§

Source§

impl Settings

Source

pub fn settings_dir() -> Result<PathBuf>

Get the global settings directory path (the canonical oxicode home: $OXICODE_HOME, else $OXI_HOME/oxicode, else ~/.oxi/oxicode).

Source

pub fn settings_toml_path() -> Result<PathBuf>

Get the global settings TOML file path (<settings_dir>/settings.toml).

Source

pub fn settings_json_path() -> Result<PathBuf>

Get the global settings JSON file path (<settings_dir>/settings.json).

Source

pub fn settings_path() -> Result<PathBuf>

Get the global settings file path (JSON takes priority).

Returns the path to the settings file that should be used. If both JSON and TOML exist, JSON is returned (takes priority). If only one exists, that path is returned. If neither exists in the canonical home, falls back read-only to the legacy home (~/.oxicode/settings.{json,toml}) when present. Otherwise returns the canonical JSON path by default (the write target).

Source

pub fn settings_path_with_preference(prefer_json: bool) -> Result<PathBuf>

Get the effective settings file path, preferring the specified format.

If prefer_json is true, checks JSON first; otherwise checks TOML first. Returns the first existing file, or — when the canonical home has neither — the legacy home’s file (read-only) when present. Falls back to the canonical preferred path otherwise.

Source

pub fn detect_format(path: &Path) -> SettingsFormat

Detect the settings file format from its path.

Source

pub fn find_project_settings(start_dir: &Path) -> Option<PathBuf>

Get the project-local settings file path.

Searches for .oxicode/settings.json first, then .oxicode/settings.toml. Returns the first one found, or None if neither exists.

Source

pub fn effective_session_dir(&self) -> Result<PathBuf>

Resolve the effective session directory.

Priority: session_dir field → canonical home sessions/.

Source

pub fn load() -> Result<Self>

Load settings, applying all layers:

  1. Built-in defaults
  2. Global canonical settings ($OXICODE_HOME, else ~/.oxi/oxicode/; legacy ~/.oxicode/ read-only fallback)
  3. Project .oxicode/settings.toml
  4. Environment variable overrides
§Examples
use oxicode_cli::Settings;

let settings = Settings::load().expect("Failed to load settings");
println!("Using model: {}", settings.effective_model(None));
Source

pub fn load_from(dir: &Path) -> Result<Self>

Load settings with an explicit working directory for project config discovery.

Always layers the global config from Self::settings_path() when it exists. Use Settings::load_from_with to inject a custom global path (e.g. for tests or portable mode).

Source

pub fn load_from_with( dir: &Path, global_override: Option<&Path>, ) -> Result<Self>

Load settings with an explicit project directory and an optional global settings path override.

Layering order:

  1. Defaults
  2. Global config from global_override if Some, else from Self::settings_path() if it exists.
  3. Project config (<dir>/.oxicode/settings.{toml,json}).
  4. Environment variable overrides.
  5. Migration.
  6. TUI language policy validation.

Passing global_override = None keeps the default behavior of reading the user’s real global settings (canonical home, with legacy read-only fallback). Tests pass Some(custom_path) or rely on the real path being absent to get pure defaults. (The test suite uses Some(specific_path) semantics by passing a temp path; passing None is also valid for “skip the global layer entirely”.)

Source

pub fn load_from_cwd() -> Result<Self>

Convenience: load from current working directory.

Source

pub fn apply_env(&mut self)

Apply environment variable overrides in-place.

DEPRECATED: Environment variable overrides are being phased out in favor of file-based configuration (the global settings file). This method is kept for CI/CD compatibility but should not be relied upon for local development. Use oxicode config set or oxicode setup instead.

Supported variables (CI/CD only):

Env varSetting
OXICODE_MODELdefault_model
OXICODE_PROVIDERdefault_provider
OXICODE_THINKINGthinking_level
OXICODE_THEMEtheme
OXICODE_MAX_TOKENSmax_tokens
OXICODE_TEMPERATUREdefault_temperature
OXICODE_SESSION_DIRsession_dir
OXICODE_EXTENSIONS_ENABLEDextensions_enabled
OXICODE_AUTO_COMPACTIONauto_compaction
OXICODE_TOOL_TIMEOUTtool_timeout_seconds
OXICODE_DISABLED_TOOLSdisabled_tools
Source

pub fn from_env() -> Self

Build a Settings instance from only environment variables (all other fields stay at defaults).

DEPRECATED: Returns defaults since env overrides are disabled. Use Settings::load() to load from settings.toml instead.

Source

pub fn save(&self) -> Result<()>

Save settings to the global config file.

Preserves the format of the existing canonical file; otherwise saves as JSON. Writes always land in the canonical home — a legacy ~/.oxicode file is never modified (see Self::settings_path for the read-side fallback).

Source

pub fn save_to(&self, path: &Path) -> Result<()>

Save settings to a specific path, using the format determined by the file extension.

Source

pub fn save_project(&self, project_dir: &Path) -> Result<()>

Save settings to the project-local config file.

Uses the format of the existing file if present, otherwise saves as JSON.

Source

pub fn serialize_for_format( settings: &Settings, format: SettingsFormat, ) -> Result<String>

Serialize settings to a string in the specified format.

Source

pub fn parse_from_str(content: &str, format: SettingsFormat) -> Result<Settings>

Parse settings from a string in the specified format.

Source

pub fn merge_cli(&mut self, model: Option<String>, provider: Option<String>)

Merge with CLI arguments (CLI takes precedence).

§Arguments
  • model — CLI-specified model override
  • provider — CLI-specified provider override
Source

pub fn effective_model(&self, cli_model: Option<&str>) -> Option<String>

Get the effective model ID (provider/model format). Returns None if no model is configured.

Source

pub fn effective_provider(&self, cli_provider: Option<&str>) -> Option<String>

Get the effective provider. Returns None if no provider is configured.

Source

pub fn effective_temperature(&self) -> Option<f64>

Get the effective temperature, preferring default_temperature (f64) over temperature (f32), falling back to None.

Source

pub fn effective_max_tokens(&self) -> Option<usize>

Get the effective max tokens, preferring max_response_tokens (usize) over max_tokens (u32), falling back to None.

Source

pub fn save_last_used(model_id: &str)

Save the last used model/provider and persist to disk.

Splits the model_id on first / to store provider and model separately.

Source

pub fn save_theme(&mut self, name: &str) -> Result<()>

Save the current theme to settings and persist to disk.

Source

pub fn get_theme_name(&self) -> String

Get the theme name from settings, returning a default if not set.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Settings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Settings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Settings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: Sized + AsFilelike,

Set the “status” flags for the self file descriptor. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more