pub struct SymbolAsString(/* private fields */);Expand description
Type to hold anything in Slosh that can be represented as a slosh symbol, however, this
type, in contrast to Symbol does need to do some allocations, specifically when
using [SlFrom]. Not a huge penalty but worth mentioning if unnecessary.
Public type used by rust native -> slosh bridge macro to represent arguments that reference a valid symbol.
Can represent SlRefInto Value types:
- Symbol
Always returns a Value::Symbol type.
Trait Implementations§
Source§impl AsRef<str> for SymbolAsString
impl AsRef<str> for SymbolAsString
Source§impl From<String> for SymbolAsString
impl From<String> for SymbolAsString
Source§impl From<SymbolAsString> for String
impl From<SymbolAsString> for String
Source§fn from(value: SymbolAsString) -> Self
fn from(value: SymbolAsString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SymbolAsString
impl RefUnwindSafe for SymbolAsString
impl Send for SymbolAsString
impl Sync for SymbolAsString
impl Unpin for SymbolAsString
impl UnwindSafe for SymbolAsString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more