#[non_exhaustive]pub struct QueryOptions {
pub timeout: Duration,
}Expand description
Options to be used with foreground_color and background_color.
You should almost always use the unchanged QueryOptions::default value.
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: DurationThe 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 Feature Detection for details on how this works.
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
Returns a duplicate 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
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