MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / endpoint_is_valid

Function endpoint_is_valid

crates/openshell-providers/src/profiles.rs:1355–1366  ·  view source on GitHub ↗
(endpoint: &EndpointProfile)

Source from the content-addressed store, hash-verified

1353}
1354
1355fn endpoint_is_valid(endpoint: &EndpointProfile) -> bool {
1356 if endpoint.host.trim().is_empty() {
1357 return false;
1358 }
1359 if !endpoint.ports.is_empty() {
1360 return endpoint
1361 .ports
1362 .iter()
1363 .all(|port| (1..=65_535).contains(port));
1364 }
1365 (1..=65_535).contains(&endpoint.port)
1366}
1367
1368#[derive(Debug, Clone)]
1369struct TokenGrantOverrideBinding {

Callers 2

validate_profilesFunction · 0.85
validate_profile_setFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected