MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / client_context

Method client_context

crates/cargo-lambda-invoke/src/lib.rs:272–288  ·  view source on GitHub ↗
(&self, encode: bool)

Source from the content-addressed store, hash-verified

270 }
271
272 fn client_context(&self, encode: bool) -> Result<Option<String>> {
273 let mut data = if let Some(file) = &self.client_context_file {
274 read_to_string(file)
275 .into_diagnostic()
276 .wrap_err("error reading client context file")?
277 } else if let Some(data) = &self.client_context_ascii {
278 data.clone()
279 } else {
280 return Ok(None);
281 };
282
283 if encode {
284 data = b64::STANDARD.encode(data)
285 }
286
287 Ok(Some(data))
288 }
289}
290
291fn example_name(example: &str) -> String {

Callers 2

invoke_remoteMethod · 0.80
invoke_localMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected