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

Method rewrite_websocket_text_placeholders

crates/openshell-core/src/secrets.rs:369–374  ·  view source on GitHub ↗

Rewrite credential placeholders inside a WebSocket text message. The message is mutated only after all placeholders resolve successfully. The return value is the number of replacements; callers must not log the rewritten text.

(
        &self,
        text: &mut String,
    )

Source from the content-addressed store, hash-verified

367 /// successfully. The return value is the number of replacements; callers
368 /// must not log the rewritten text.
369 pub fn rewrite_websocket_text_placeholders(
370 &self,
371 text: &mut String,
372 ) -> Result<usize, UnresolvedPlaceholderError> {
373 self.rewrite_text_placeholders(text, "websocket")
374 }
375
376 fn credential_token_at<'a>(
377 &'a self,

Calls 1