pub struct ArtifactConfig {
pub required_files: Vec<String>,
pub optional_files: Vec<String>,
}Expand description
Configuration for artifact file management. Defines which files are required and which are optional in an ML-bin.
Fields§
§required_files: Vec<String>List of required file patterns (supports globs and directory paths ending with /). Files matching these patterns must exist in every ML-bin.
optional_files: Vec<String>List of optional file patterns (supports globs). Files matching these patterns are allowed but not required.
Implementations§
Source§impl ArtifactConfig
impl ArtifactConfig
Sourcepub fn is_required_file(&self, filename: &Path) -> bool
pub fn is_required_file(&self, filename: &Path) -> bool
Checks if a file matches any required file pattern.
Supports both glob patterns and directory paths (ending with / or \).
For directory patterns, any file under that directory is considered a match.
§Arguments
filename- The relative path of the file to check
§Returns
true if the file matches any required pattern, false otherwise.
Trait Implementations§
Source§impl Debug for ArtifactConfig
impl Debug for ArtifactConfig
Source§impl Default for ArtifactConfig
impl Default for ArtifactConfig
Source§fn default() -> ArtifactConfig
fn default() -> ArtifactConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArtifactConfigwhere
ArtifactConfig: Default,
impl<'de> Deserialize<'de> for ArtifactConfigwhere
ArtifactConfig: 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 ArtifactConfig
impl RefUnwindSafe for ArtifactConfig
impl Send for ArtifactConfig
impl Sync for ArtifactConfig
impl Unpin for ArtifactConfig
impl UnwindSafe for ArtifactConfig
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