pub struct ToString(pub String);Expand description
String wrapper struct that can be used to read a lua value by converting it
to string possibly using __tostring metamethod.
Tuple Fields
0: StringTrait Implementations
sourceimpl<L> LuaRead<L> for ToString where
L: AsLua,
impl<L> LuaRead<L> for ToString where
L: AsLua,
sourcefn lua_read_at_position(lua: L, index: NonZeroI32) -> Result<Self, L>
fn lua_read_at_position(lua: L, index: NonZeroI32) -> Result<Self, L>
Reads the data from Lua at a given position.
fn n_values_expected() -> i32
fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> Result<Self, L>
Auto Trait Implementations
impl RefUnwindSafe for ToString
impl Send for ToString
impl Sync for ToString
impl Unpin for ToString
impl UnwindSafe for ToString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more