Skip to main content

label

Function label 

Source
pub fn label(value: &str, max: usize) -> String
Expand description

An identifier as a label the ledger accepts (spec 3.2 §7.10): every character a label may not hold replaced with _, shortened to max characters. For identifiers a writer copies into a row, such as an agent’s id or a run’s target — never for content, which belongs in an activity’s subject.

§Example

assert_eq!(adk_kernel::proc::label("urn:adk:agent:my app/coder", 128), "urn:adk:agent:my_app/coder");