Struct terminal_colorsaurus::QueryOptions
source · #[non_exhaustive]pub struct QueryOptions {
pub timeout: Duration,
}
Expand description
Options to be used with foreground_color
and background_color
.
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.timeout: Duration
The maximum time spent waiting for a response from the terminal. Defaults to 1 s.
Consider leaving this on a high value as there might be a lot of latency
between you and the terminal (e.g. when you’re connected via SSH).
Terminals that don’t support querying for colors will almost always be detected as such before this timeout elapses.
See the Latency Measurements for examples.
Trait Implementations§
source§impl Clone for QueryOptions
impl Clone for QueryOptions
source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
Returns a copy 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 moresource§impl Debug for QueryOptions
impl Debug for QueryOptions
source§impl Default for QueryOptions
impl Default for QueryOptions
source§impl PartialEq for QueryOptions
impl PartialEq for QueryOptions
source§fn eq(&self, other: &QueryOptions) -> bool
fn eq(&self, other: &QueryOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for QueryOptions
impl StructuralPartialEq for QueryOptions
Auto Trait Implementations§
impl Freeze for QueryOptions
impl RefUnwindSafe for QueryOptions
impl Send for QueryOptions
impl Sync for QueryOptions
impl Unpin for QueryOptions
impl UnwindSafe for QueryOptions
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