MCPcopy Create free account
hub / github.com/Botloader/botloader / validate

Function validate

components/validation/src/lib.rs:20–32  ·  view source on GitHub ↗
(
    val: &T,
    ctx_data: &T::ContextData,
)

Source from the content-addressed store, hash-verified

18}
19
20pub fn validate<T: Validator>(
21 val: &T,
22 ctx_data: &T::ContextData,
23) -> Result<(), Vec<ValidationError>> {
24 let mut ctx = ValidationContext::new();
25
26 val.validate(&mut ctx, ctx_data);
27 if ctx.errs.is_empty() {
28 Ok(())
29 } else {
30 Err(ctx.errs)
31 }
32}
33
34pub struct ValidationContext {
35 errs: Vec<ValidationError>,

Callers 8

create_pluginFunction · 0.85
update_plugin_metaFunction · 0.85
update_plugin_dev_sourceFunction · 0.85
publish_plugin_versionFunction · 0.85
create_guild_scriptFunction · 0.85
update_guild_scriptFunction · 0.85
validate_script_settingsFunction · 0.85
validate_script_metaFunction · 0.85

Calls 1

validateMethod · 0.45

Tested by

no test coverage detected