MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / arg

Method arg

nodedb/src/control/server/resp/command.rs:43–45  ·  view source on GitHub ↗

Get argument at index as bytes. Returns None if out of bounds.

(&self, index: usize)

Source from the content-addressed store, hash-verified

41
42 /// Get argument at index as bytes. Returns None if out of bounds.
43 pub fn arg(&self, index: usize) -> Option<&[u8]> {
44 self.args.get(index).map(|v| v.as_slice())
45 }
46
47 /// Get argument at index as UTF-8 string. Returns None if out of bounds or invalid UTF-8.
48 pub fn arg_str(&self, index: usize) -> Option<&str> {

Callers 9

mainFunction · 0.80
handle_getFunction · 0.80
handle_incrFunction · 0.80
handle_pingFunction · 0.80
handle_echoFunction · 0.80
handle_ttlFunction · 0.80
handle_persistFunction · 0.80
handle_zrankFunction · 0.80
handle_zscoreFunction · 0.80

Calls 2

getMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected