pub struct SampleYamlConfig {
pub default: DefaultConfig,
pub classification: ClassificationConfig,
pub tables: HashMap<String, TableConfig>,
}Expand description
Complete YAML configuration for sample command
Fields§
§default: DefaultConfigDefault sampling settings
classification: ClassificationConfigTable classification lists
tables: HashMap<String, TableConfig>Per-table settings
Implementations§
Source§impl SampleYamlConfig
impl SampleYamlConfig
Sourcepub fn get_table_config(&self, table_name: &str) -> Option<&TableConfig>
pub fn get_table_config(&self, table_name: &str) -> Option<&TableConfig>
Get configuration for a specific table
Sourcepub fn get_classification(&self, table_name: &str) -> TableClassification
pub fn get_classification(&self, table_name: &str) -> TableClassification
Get classification for a table
Sourcepub fn should_skip(&self, table_name: &str) -> bool
pub fn should_skip(&self, table_name: &str) -> bool
Check if a table should be skipped
Sourcepub fn get_percent(&self, table_name: &str) -> Option<u32>
pub fn get_percent(&self, table_name: &str) -> Option<u32>
Get sample percent for a table (table-specific or default)
Trait Implementations§
Source§impl Clone for SampleYamlConfig
impl Clone for SampleYamlConfig
Source§fn clone(&self) -> SampleYamlConfig
fn clone(&self) -> SampleYamlConfig
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 SampleYamlConfig
impl Debug for SampleYamlConfig
Source§impl Default for SampleYamlConfig
impl Default for SampleYamlConfig
Source§fn default() -> SampleYamlConfig
fn default() -> SampleYamlConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SampleYamlConfigwhere
SampleYamlConfig: Default,
impl<'de> Deserialize<'de> for SampleYamlConfigwhere
SampleYamlConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SampleYamlConfig
impl RefUnwindSafe for SampleYamlConfig
impl Send for SampleYamlConfig
impl Sync for SampleYamlConfig
impl Unpin for SampleYamlConfig
impl UnwindSafe for SampleYamlConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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