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

Method arg_str

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

Get argument at index as UTF-8 string. Returns None if out of bounds or invalid UTF-8.

(&self, index: usize)

Source from the content-addressed store, hash-verified

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> {
49 self.args
50 .get(index)
51 .and_then(|v| std::str::from_utf8(v).ok())
52 }
53
54 /// Get argument at index parsed as i64.
55 pub fn arg_i64(&self, index: usize) -> Option<i64> {

Callers 10

arg_i64Method · 0.80
handle_setFunction · 0.80
handle_incrbyfloatFunction · 0.80
handle_selectFunction · 0.80
handle_authFunction · 0.80
handle_scanFunction · 0.80
handle_keysFunction · 0.80
handle_hgetFunction · 0.80
handle_zaddFunction · 0.80
handle_publishFunction · 0.80

Calls 2

getMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected