MCPcopy Index your code
hub / github.com/RustPython/RustPython / new_str

Method new_str

crates/vm/src/stdlib/_ast/constant.rs:13–23  ·  view source on GitHub ↗
(
        value: impl Into<Box<str>>,
        prefix: StringLiteralPrefix,
        range: TextRange,
    )

Source from the content-addressed store, hash-verified

11
12impl Constant {
13 pub(super) fn new_str(
14 value: impl Into<Box<str>>,
15 prefix: StringLiteralPrefix,
16 range: TextRange,
17 ) -> Self {
18 let value = value.into();
19 Self {
20 range,
21 value: ConstantLiteral::Str { value, prefix },
22 }
23 }
24
25 pub(super) const fn new_int(value: ast::Int, range: TextRange) -> Self {
26 Self {

Callers 15

get_single_attrMethod · 0.45
getpwnamFunction · 0.45
getpwuidFunction · 0.45
argvFunction · 0.45
builtin_module_namesFunction · 0.45
stdlib_module_namesFunction · 0.45
orig_argvFunction · 0.45
pathFunction · 0.45
_xoptionsFunction · 0.45
warnoptionsFunction · 0.45
breakpointhookFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected