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

Function parse_material_i64

crates/openshell-server/src/provider_refresh.rs:628–639  ·  view source on GitHub ↗
(
    material: &HashMap<String, String>,
    key: &str,
)

Source from the content-addressed store, hash-verified

626}
627
628pub fn parse_material_i64(
629 material: &HashMap<String, String>,
630 key: &str,
631) -> Result<Option<i64>, Status> {
632 let Some(value) = material_value(material, &[key]) else {
633 return Ok(None);
634 };
635 value
636 .parse::<i64>()
637 .map(Some)
638 .map_err(|_| Status::invalid_argument(format!("{key} material must be a signed integer")))
639}
640
641fn oauth2_token_url(state: &StoredProviderCredentialRefreshState) -> Result<String, Status> {
642 if let Some(tenant_id) = material_value(&state.material, &["tenant_id"]) {

Callers 1

Calls 1

material_valueFunction · 0.85

Tested by

no test coverage detected