pub struct DsfbSignatureFile {
pub schema_version: String,
pub tool_class: String,
pub vendor: Option<String>,
pub heuristics: Vec<DsfbHeuristicSignature>,
}Expand description
A complete .dsfb signature file: a schema-versioned bundle of heuristic
signatures ready for runtime loading.
§Example
use dsfb_semiconductor::signature::{DsfbSignatureFile, SIGNATURE_SCHEMA_VERSION};
let file = DsfbSignatureFile {
schema_version: SIGNATURE_SCHEMA_VERSION.into(),
tool_class: "ICP Etch".into(),
vendor: Some("Example Semiconductor Equipment Inc.".into()),
heuristics: vec![],
};
let json = serde_json::to_string_pretty(&file).unwrap();
assert!(json.contains("schema_version"));
assert!(json.contains("1.0"));Fields§
§schema_version: StringSchema version — must be "1.0" for this crate version.
tool_class: StringBroad class of tool this signature targets (e.g., "ICP Etch",
"PECVD", "CMP").
vendor: Option<String>Optional vendor attribution.
heuristics: Vec<DsfbHeuristicSignature>The heuristic entries in this signature file.
Implementations§
Source§impl DsfbSignatureFile
impl DsfbSignatureFile
Sourcepub fn validate(&self) -> Result<(), DsfbSemiconductorError>
pub fn validate(&self) -> Result<(), DsfbSemiconductorError>
Validate schema version and structural constraints.
Returns Err with a descriptive message if validation fails.
Sourcepub fn load(path: &Path) -> Result<Self, DsfbSemiconductorError>
pub fn load(path: &Path) -> Result<Self, DsfbSemiconductorError>
Load and validate a signature file from disk.
§Errors
Returns DsfbSemiconductorError on I/O failure, JSON parse failure,
or schema validation failure.
Sourcepub fn to_json_pretty(&self) -> Result<String, DsfbSemiconductorError>
pub fn to_json_pretty(&self) -> Result<String, DsfbSemiconductorError>
Serialise to a pretty-printed JSON string.
Sourcepub fn example_target_depletion() -> Self
pub fn example_target_depletion() -> Self
Return a reference signature for the “Target Depletion” failure mode.
This can be shipped as an example .dsfb file to tool vendors.
Trait Implementations§
Source§impl Clone for DsfbSignatureFile
impl Clone for DsfbSignatureFile
Source§fn clone(&self) -> DsfbSignatureFile
fn clone(&self) -> DsfbSignatureFile
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 DsfbSignatureFile
impl Debug for DsfbSignatureFile
Source§impl<'de> Deserialize<'de> for DsfbSignatureFile
impl<'de> Deserialize<'de> for DsfbSignatureFile
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
Source§impl PartialEq for DsfbSignatureFile
impl PartialEq for DsfbSignatureFile
Source§impl Serialize for DsfbSignatureFile
impl Serialize for DsfbSignatureFile
impl StructuralPartialEq for DsfbSignatureFile
Auto Trait Implementations§
impl Freeze for DsfbSignatureFile
impl RefUnwindSafe for DsfbSignatureFile
impl Send for DsfbSignatureFile
impl Sync for DsfbSignatureFile
impl Unpin for DsfbSignatureFile
impl UnsafeUnpin for DsfbSignatureFile
impl UnwindSafe for DsfbSignatureFile
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