Struct starlark::values::ConstFrozenString [−][src]
pub struct ConstFrozenString(_);
Expand description
Define a &'static
str
that can be converted to a FrozenValue
.
Usually used as:
use starlark::const_frozen_string;
use starlark::values::{ConstFrozenString, FrozenValue};
static RES: ConstFrozenString = const_frozen_string!("magic");
let fv: FrozenValue = RES.unpack();
assert_eq!(Some("magic"), fv.to_value().unpack_str());
Implementations
Obtain the FrozenValue
for a ConstFrozenString
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ConstFrozenString
impl Send for ConstFrozenString
impl Sync for ConstFrozenString
impl Unpin for ConstFrozenString
impl !UnwindSafe for ConstFrozenString
Blanket Implementations
Mutably borrows from an owned value. Read more