MCPcopy Create free account
hub / github.com/dprint/jsonc-parser / into_string

Method into_string

src/ast.rs:380–385  ·  view source on GitHub ↗

Converts the object property name into a string.

(self)

Source from the content-addressed store, hash-verified

378impl<'a> ObjectPropName<'a> {
379 /// Converts the object property name into a string.
380 pub fn into_string(self) -> String {
381 match self {
382 ObjectPropName::String(lit) => lit.value.into_owned(),
383 ObjectPropName::Word(lit) => lit.value.to_string(),
384 }
385 }
386
387 /// Gets the object property name as a string reference.
388 pub fn as_str(&'a self) -> &'a str {

Callers 3

parse_objectFunction · 0.45
next_key_seedMethod · 0.45
fromMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected