InfluxDBv3EnterpriseParameters

Struct InfluxDBv3EnterpriseParameters 

Source
#[non_exhaustive]
pub struct InfluxDBv3EnterpriseParameters {
Show 52 fields pub query_file_limit: Option<i32>, pub query_log_size: Option<i32>, pub log_filter: Option<String>, pub log_format: Option<LogFormats>, pub data_fusion_num_threads: Option<i32>, pub data_fusion_runtime_type: Option<DataFusionRuntimeType>, pub data_fusion_runtime_disable_lifo_slot: Option<bool>, pub data_fusion_runtime_event_interval: Option<i32>, pub data_fusion_runtime_global_queue_interval: Option<i32>, pub data_fusion_runtime_max_blocking_threads: Option<i32>, pub data_fusion_runtime_max_io_events_per_tick: Option<i32>, pub data_fusion_runtime_thread_keep_alive: Option<Duration>, pub data_fusion_runtime_thread_priority: Option<i32>, pub data_fusion_max_parquet_fanout: Option<i32>, pub data_fusion_use_cached_parquet_loader: Option<bool>, pub data_fusion_config: Option<String>, pub max_http_request_size: Option<i64>, pub force_snapshot_mem_threshold: Option<PercentOrAbsoluteLong>, pub wal_snapshot_size: Option<i32>, pub wal_max_write_buffer_size: Option<i32>, pub snapshotted_wal_files_to_keep: Option<i32>, pub preemptive_cache_age: Option<Duration>, pub parquet_mem_cache_prune_percentage: Option<f32>, pub parquet_mem_cache_prune_interval: Option<Duration>, pub disable_parquet_mem_cache: Option<bool>, pub parquet_mem_cache_query_path_duration: Option<Duration>, pub last_cache_eviction_interval: Option<Duration>, pub distinct_cache_eviction_interval: Option<Duration>, pub gen1_duration: Option<Duration>, pub exec_mem_pool_bytes: Option<PercentOrAbsoluteLong>, pub parquet_mem_cache_size: Option<PercentOrAbsoluteLong>, pub wal_replay_fail_on_error: Option<bool>, pub wal_replay_concurrency_limit: Option<i32>, pub table_index_cache_max_entries: Option<i32>, pub table_index_cache_concurrency_limit: Option<i32>, pub gen1_lookback_duration: Option<Duration>, pub retention_check_interval: Option<Duration>, pub delete_grace_period: Option<Duration>, pub hard_delete_default_duration: Option<Duration>, pub ingest_query_instances: i32, pub query_only_instances: i32, pub dedicated_compactor: bool, pub compaction_row_limit: Option<i32>, pub compaction_max_num_files_per_plan: Option<i32>, pub compaction_gen2_duration: Option<Duration>, pub compaction_multipliers: Option<String>, pub compaction_cleanup_wait: Option<Duration>, pub compaction_check_interval: Option<Duration>, pub last_value_cache_disable_from_history: Option<bool>, pub distinct_value_cache_disable_from_history: Option<bool>, pub replication_interval: Option<Duration>, pub catalog_sync_interval: Option<Duration>,
}
Expand description

All the customer-modifiable InfluxDB v3 Enterprise parameters in Timestream for InfluxDB.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§query_file_limit: Option<i32>

Limits the number of Parquet files a query can access. If a query attempts to read more than this limit, InfluxDB 3 returns an error.

Default: 432

§query_log_size: Option<i32>

Defines the size of the query log. Up to this many queries remain in the log before older queries are evicted to make room for new ones.

Default: 1000

§log_filter: Option<String>

Sets the filter directive for logs.

§log_format: Option<LogFormats>

Defines the message format for logs.

Default: full

§data_fusion_num_threads: Option<i32>

Sets the maximum number of DataFusion runtime threads to use.

§data_fusion_runtime_type: Option<DataFusionRuntimeType>

Specifies the DataFusion tokio runtime type.

Default: multi-thread

§data_fusion_runtime_disable_lifo_slot: Option<bool>

Disables the LIFO slot of the DataFusion runtime.

§data_fusion_runtime_event_interval: Option<i32>

Sets the number of scheduler ticks after which the scheduler of the DataFusion tokio runtime polls for external events–for example: timers, I/O.

§data_fusion_runtime_global_queue_interval: Option<i32>

Sets the number of scheduler ticks after which the scheduler of the DataFusion runtime polls the global task queue.

§data_fusion_runtime_max_blocking_threads: Option<i32>

Specifies the limit for additional threads spawned by the DataFusion runtime.

§data_fusion_runtime_max_io_events_per_tick: Option<i32>

Configures the maximum number of events processed per tick by the tokio DataFusion runtime.

§data_fusion_runtime_thread_keep_alive: Option<Duration>

Sets a custom timeout for a thread in the blocking pool of the tokio DataFusion runtime.

§data_fusion_runtime_thread_priority: Option<i32>

Sets the thread priority for tokio DataFusion runtime workers.

Default: 10

§data_fusion_max_parquet_fanout: Option<i32>

When multiple parquet files are required in a sorted way (deduplication for example), specifies the maximum fanout.

Default: 1000

§data_fusion_use_cached_parquet_loader: Option<bool>

Uses a cached parquet loader when reading parquet files from the object store.

§data_fusion_config: Option<String>

Provides custom configuration to DataFusion as a comma-separated list of key:value pairs.

§max_http_request_size: Option<i64>

Specifies the maximum size of HTTP requests.

Default: 10485760

§force_snapshot_mem_threshold: Option<PercentOrAbsoluteLong>

Specifies the threshold for the internal memory buffer. Supports either a percentage (portion of available memory) or absolute value in MB–for example: 70% or 100

Default: 70%

§wal_snapshot_size: Option<i32>

Defines the number of WAL files to attempt to remove in a snapshot. This, multiplied by the interval, determines how often snapshots are taken.

Default: 600

§wal_max_write_buffer_size: Option<i32>

Specifies the maximum number of write requests that can be buffered before a flush must be executed and succeed.

Default: 100000

§snapshotted_wal_files_to_keep: Option<i32>

Specifies the number of snapshotted WAL files to retain in the object store. Flushing the WAL files does not clear the WAL files immediately; they are deleted when the number of snapshotted WAL files exceeds this number.

Default: 300

§preemptive_cache_age: Option<Duration>

Specifies the interval to prefetch into the Parquet cache during compaction.

Default: 3d

§parquet_mem_cache_prune_percentage: Option<f32>

Specifies the percentage of entries to prune during a prune operation on the in-memory Parquet cache.

Default: 0.1

§parquet_mem_cache_prune_interval: Option<Duration>

Sets the interval to check if the in-memory Parquet cache needs to be pruned.

Default: 1s

§disable_parquet_mem_cache: Option<bool>

Disables the in-memory Parquet cache. By default, the cache is enabled.

§parquet_mem_cache_query_path_duration: Option<Duration>

Specifies the time window for caching recent Parquet files in memory.

Default: 5h

§last_cache_eviction_interval: Option<Duration>

Specifies the interval to evict expired entries from the Last-N-Value cache, expressed as a human-readable duration–for example: 20s, 1m, 1h.

Default: 10s

§distinct_cache_eviction_interval: Option<Duration>

Specifies the interval to evict expired entries from the distinct value cache, expressed as a human-readable duration–for example: 20s, 1m, 1h.

Default: 10s

§gen1_duration: Option<Duration>

Specifies the duration that Parquet files are arranged into. Data timestamps land each row into a file of this duration. Supported durations are 1m, 5m, and 10m. These files are known as “generation 1” files, which the compactor can merge into larger generations.

Default: 10m

§exec_mem_pool_bytes: Option<PercentOrAbsoluteLong>

Specifies the size of memory pool used during query execution. Can be given as absolute value in bytes or as a percentage of the total available memory–for example: 8000000000 or 10%.

Default: 20%

§parquet_mem_cache_size: Option<PercentOrAbsoluteLong>

Specifies the size of the in-memory Parquet cache in megabytes or percentage of total available memory.

Default: 20%

§wal_replay_fail_on_error: Option<bool>

Determines whether WAL replay should fail when encountering errors.

Default: false

§wal_replay_concurrency_limit: Option<i32>

Concurrency limit during WAL replay. Setting this number too high can lead to OOM. The default is dynamically determined.

Default: max(num_cpus, 10)

§table_index_cache_max_entries: Option<i32>

Specifies the maximum number of entries in the table index cache.

Default: 1000

§table_index_cache_concurrency_limit: Option<i32>

Limits the concurrency level for table index cache operations.

Default: 8

§gen1_lookback_duration: Option<Duration>

Specifies how far back to look when creating generation 1 Parquet files.

Default: 24h

§retention_check_interval: Option<Duration>

The interval at which retention policies are checked and enforced. Enter as a human-readable time–for example: 30m or 1h.

Default: 30m

§delete_grace_period: Option<Duration>

Specifies the grace period before permanently deleting data.

Default: 24h

§hard_delete_default_duration: Option<Duration>

Sets the default duration for hard deletion of data.

Default: 90d

§ingest_query_instances: i32

Specifies number of instances in the DbCluster which can both ingest and query.

§query_only_instances: i32

Specifies number of instances in the DbCluster which can only query.

§dedicated_compactor: bool

Specifies if the compactor instance should be a standalone instance or not.

§compaction_row_limit: Option<i32>

Specifies the soft limit for the number of rows per file that the compactor writes. The compactor may write more rows than this limit.

Default: 1000000

§compaction_max_num_files_per_plan: Option<i32>

Sets the maximum number of files included in any compaction plan.

Default: 500

§compaction_gen2_duration: Option<Duration>

Specifies the duration of the first level of compaction (gen2). Later levels of compaction are multiples of this duration. This value should be equal to or greater than the gen1 duration.

Default: 20m

§compaction_multipliers: Option<String>

Specifies a comma-separated list of multiples defining the duration of each level of compaction. The number of elements in the list determines the number of compaction levels. The first element specifies the duration of the first level (gen3); subsequent levels are multiples of the previous level.

Default: 3,4,6,5

§compaction_cleanup_wait: Option<Duration>

Specifies the amount of time that the compactor waits after finishing a compaction run to delete files marked as needing deletion during that compaction run.

Default: 10m

§compaction_check_interval: Option<Duration>

Specifies how often the compactor checks for new compaction work to perform.

Default: 10s

§last_value_cache_disable_from_history: Option<bool>

Disables populating the last-N-value cache from historical data. If disabled, the cache is still populated with data from the write-ahead log (WAL).

§distinct_value_cache_disable_from_history: Option<bool>

Disables populating the distinct value cache from historical data. If disabled, the cache is still populated with data from the write-ahead log (WAL).

§replication_interval: Option<Duration>

Specifies the interval at which data replication occurs between cluster nodes.

Default: 250ms

§catalog_sync_interval: Option<Duration>

Defines how often the catalog synchronizes across cluster nodes.

Default: 10s

Implementations§

Source§

impl InfluxDBv3EnterpriseParameters

Source

pub fn query_file_limit(&self) -> Option<i32>

Limits the number of Parquet files a query can access. If a query attempts to read more than this limit, InfluxDB 3 returns an error.

Default: 432

Source

pub fn query_log_size(&self) -> Option<i32>

Defines the size of the query log. Up to this many queries remain in the log before older queries are evicted to make room for new ones.

Default: 1000

Source

pub fn log_filter(&self) -> Option<&str>

Sets the filter directive for logs.

Source

pub fn log_format(&self) -> Option<&LogFormats>

Defines the message format for logs.

Default: full

Source

pub fn data_fusion_num_threads(&self) -> Option<i32>

Sets the maximum number of DataFusion runtime threads to use.

Source

pub fn data_fusion_runtime_type(&self) -> Option<&DataFusionRuntimeType>

Specifies the DataFusion tokio runtime type.

Default: multi-thread

Source

pub fn data_fusion_runtime_disable_lifo_slot(&self) -> Option<bool>

Disables the LIFO slot of the DataFusion runtime.

Source

pub fn data_fusion_runtime_event_interval(&self) -> Option<i32>

Sets the number of scheduler ticks after which the scheduler of the DataFusion tokio runtime polls for external events–for example: timers, I/O.

Source

pub fn data_fusion_runtime_global_queue_interval(&self) -> Option<i32>

Sets the number of scheduler ticks after which the scheduler of the DataFusion runtime polls the global task queue.

Source

pub fn data_fusion_runtime_max_blocking_threads(&self) -> Option<i32>

Specifies the limit for additional threads spawned by the DataFusion runtime.

Source

pub fn data_fusion_runtime_max_io_events_per_tick(&self) -> Option<i32>

Configures the maximum number of events processed per tick by the tokio DataFusion runtime.

Source

pub fn data_fusion_runtime_thread_keep_alive(&self) -> Option<&Duration>

Sets a custom timeout for a thread in the blocking pool of the tokio DataFusion runtime.

Source

pub fn data_fusion_runtime_thread_priority(&self) -> Option<i32>

Sets the thread priority for tokio DataFusion runtime workers.

Default: 10

Source

pub fn data_fusion_max_parquet_fanout(&self) -> Option<i32>

When multiple parquet files are required in a sorted way (deduplication for example), specifies the maximum fanout.

Default: 1000

Source

pub fn data_fusion_use_cached_parquet_loader(&self) -> Option<bool>

Uses a cached parquet loader when reading parquet files from the object store.

Source

pub fn data_fusion_config(&self) -> Option<&str>

Provides custom configuration to DataFusion as a comma-separated list of key:value pairs.

Source

pub fn max_http_request_size(&self) -> Option<i64>

Specifies the maximum size of HTTP requests.

Default: 10485760

Source

pub fn force_snapshot_mem_threshold(&self) -> Option<&PercentOrAbsoluteLong>

Specifies the threshold for the internal memory buffer. Supports either a percentage (portion of available memory) or absolute value in MB–for example: 70% or 100

Default: 70%

Source

pub fn wal_snapshot_size(&self) -> Option<i32>

Defines the number of WAL files to attempt to remove in a snapshot. This, multiplied by the interval, determines how often snapshots are taken.

Default: 600

Source

pub fn wal_max_write_buffer_size(&self) -> Option<i32>

Specifies the maximum number of write requests that can be buffered before a flush must be executed and succeed.

Default: 100000

Source

pub fn snapshotted_wal_files_to_keep(&self) -> Option<i32>

Specifies the number of snapshotted WAL files to retain in the object store. Flushing the WAL files does not clear the WAL files immediately; they are deleted when the number of snapshotted WAL files exceeds this number.

Default: 300

Source

pub fn preemptive_cache_age(&self) -> Option<&Duration>

Specifies the interval to prefetch into the Parquet cache during compaction.

Default: 3d

Source

pub fn parquet_mem_cache_prune_percentage(&self) -> Option<f32>

Specifies the percentage of entries to prune during a prune operation on the in-memory Parquet cache.

Default: 0.1

Source

pub fn parquet_mem_cache_prune_interval(&self) -> Option<&Duration>

Sets the interval to check if the in-memory Parquet cache needs to be pruned.

Default: 1s

Source

pub fn disable_parquet_mem_cache(&self) -> Option<bool>

Disables the in-memory Parquet cache. By default, the cache is enabled.

Source

pub fn parquet_mem_cache_query_path_duration(&self) -> Option<&Duration>

Specifies the time window for caching recent Parquet files in memory.

Default: 5h

Source

pub fn last_cache_eviction_interval(&self) -> Option<&Duration>

Specifies the interval to evict expired entries from the Last-N-Value cache, expressed as a human-readable duration–for example: 20s, 1m, 1h.

Default: 10s

Source

pub fn distinct_cache_eviction_interval(&self) -> Option<&Duration>

Specifies the interval to evict expired entries from the distinct value cache, expressed as a human-readable duration–for example: 20s, 1m, 1h.

Default: 10s

Source

pub fn gen1_duration(&self) -> Option<&Duration>

Specifies the duration that Parquet files are arranged into. Data timestamps land each row into a file of this duration. Supported durations are 1m, 5m, and 10m. These files are known as “generation 1” files, which the compactor can merge into larger generations.

Default: 10m

Source

pub fn exec_mem_pool_bytes(&self) -> Option<&PercentOrAbsoluteLong>

Specifies the size of memory pool used during query execution. Can be given as absolute value in bytes or as a percentage of the total available memory–for example: 8000000000 or 10%.

Default: 20%

Source

pub fn parquet_mem_cache_size(&self) -> Option<&PercentOrAbsoluteLong>

Specifies the size of the in-memory Parquet cache in megabytes or percentage of total available memory.

Default: 20%

Source

pub fn wal_replay_fail_on_error(&self) -> Option<bool>

Determines whether WAL replay should fail when encountering errors.

Default: false

Source

pub fn wal_replay_concurrency_limit(&self) -> Option<i32>

Concurrency limit during WAL replay. Setting this number too high can lead to OOM. The default is dynamically determined.

Default: max(num_cpus, 10)

Source

pub fn table_index_cache_max_entries(&self) -> Option<i32>

Specifies the maximum number of entries in the table index cache.

Default: 1000

Source

pub fn table_index_cache_concurrency_limit(&self) -> Option<i32>

Limits the concurrency level for table index cache operations.

Default: 8

Source

pub fn gen1_lookback_duration(&self) -> Option<&Duration>

Specifies how far back to look when creating generation 1 Parquet files.

Default: 24h

Source

pub fn retention_check_interval(&self) -> Option<&Duration>

The interval at which retention policies are checked and enforced. Enter as a human-readable time–for example: 30m or 1h.

Default: 30m

Source

pub fn delete_grace_period(&self) -> Option<&Duration>

Specifies the grace period before permanently deleting data.

Default: 24h

Source

pub fn hard_delete_default_duration(&self) -> Option<&Duration>

Sets the default duration for hard deletion of data.

Default: 90d

Source

pub fn ingest_query_instances(&self) -> i32

Specifies number of instances in the DbCluster which can both ingest and query.

Source

pub fn query_only_instances(&self) -> i32

Specifies number of instances in the DbCluster which can only query.

Source

pub fn dedicated_compactor(&self) -> bool

Specifies if the compactor instance should be a standalone instance or not.

Source

pub fn compaction_row_limit(&self) -> Option<i32>

Specifies the soft limit for the number of rows per file that the compactor writes. The compactor may write more rows than this limit.

Default: 1000000

Source

pub fn compaction_max_num_files_per_plan(&self) -> Option<i32>

Sets the maximum number of files included in any compaction plan.

Default: 500

Source

pub fn compaction_gen2_duration(&self) -> Option<&Duration>

Specifies the duration of the first level of compaction (gen2). Later levels of compaction are multiples of this duration. This value should be equal to or greater than the gen1 duration.

Default: 20m

Source

pub fn compaction_multipliers(&self) -> Option<&str>

Specifies a comma-separated list of multiples defining the duration of each level of compaction. The number of elements in the list determines the number of compaction levels. The first element specifies the duration of the first level (gen3); subsequent levels are multiples of the previous level.

Default: 3,4,6,5

Source

pub fn compaction_cleanup_wait(&self) -> Option<&Duration>

Specifies the amount of time that the compactor waits after finishing a compaction run to delete files marked as needing deletion during that compaction run.

Default: 10m

Source

pub fn compaction_check_interval(&self) -> Option<&Duration>

Specifies how often the compactor checks for new compaction work to perform.

Default: 10s

Source

pub fn last_value_cache_disable_from_history(&self) -> Option<bool>

Disables populating the last-N-value cache from historical data. If disabled, the cache is still populated with data from the write-ahead log (WAL).

Source

pub fn distinct_value_cache_disable_from_history(&self) -> Option<bool>

Disables populating the distinct value cache from historical data. If disabled, the cache is still populated with data from the write-ahead log (WAL).

Source

pub fn replication_interval(&self) -> Option<&Duration>

Specifies the interval at which data replication occurs between cluster nodes.

Default: 250ms

Source

pub fn catalog_sync_interval(&self) -> Option<&Duration>

Defines how often the catalog synchronizes across cluster nodes.

Default: 10s

Source§

impl InfluxDBv3EnterpriseParameters

Source

pub fn builder() -> InfluxDBv3EnterpriseParametersBuilder

Creates a new builder-style object to manufacture InfluxDBv3EnterpriseParameters.

Trait Implementations§

Source§

impl Clone for InfluxDBv3EnterpriseParameters

Source§

fn clone(&self) -> InfluxDBv3EnterpriseParameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for InfluxDBv3EnterpriseParameters

Source§

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

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

impl PartialEq for InfluxDBv3EnterpriseParameters

Source§

fn eq(&self, other: &InfluxDBv3EnterpriseParameters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for InfluxDBv3EnterpriseParameters

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

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

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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