Skip to main content

encode_subject_segment

Function encode_subject_segment 

Source
pub fn encode_subject_segment(value: &str) -> String
Expand description

Encodes a string for use as a single NATS subject segment by escaping the characters NATS reserves (see EscapingSubject).

The result contains no ., * or >, so it cannot split the segment or act as a wildcard. Use this on the client side when constructing command subjects. The matching decode is in [__private::decode_subject_segment].