MCPcopy Create free account
hub / github.com/PerroEngine/Perro / validate

Method validate

perro_source/api_modules/perro_networking/src/tcp.rs:76–92  ·  view source on GitHub ↗
(&self, expected: &NetHandshake)

Source from the content-addressed store, hash-verified

74
75 Ok(Self {
76 app,
77 protocol,
78 version,
79 })
80 }
81
82 pub fn validate(&self, expected: &NetHandshake) -> NetResult<()> {
83 if self == expected {
84 return Ok(());
85 }
86 Err(NetError::new(
87 NetErrorKind::Handshake,
88 format!(
89 "handshake mismatch: got {}/{}/{}, expected {}/{}/{}",
90 self.app,
91 self.protocol,
92 self.version,
93 expected.app,
94 expected.protocol,
95 expected.version

Callers 8

parse_and_validateFunction · 0.80
parse_and_validateFunction · 0.80
parse_and_validateFunction · 0.80
builtin_post_wgsl_parsesFunction · 0.80
parse_and_validateFunction · 0.80
parse_and_validateFunction · 0.80
parse_and_validateFunction · 0.80

Calls

no outgoing calls

Tested by 2

builtin_post_wgsl_parsesFunction · 0.64