pub struct StaticIter<'a, T> {
pub map: Box<dyn Fn(&State, T) -> Result<Pushed> + 'a>,
/* private fields */
}Expand description
Represents an iterator
Fields§
§map: Box<dyn Fn(&State, T) -> Result<Pushed> + 'a>Implementations§
Source§impl<T: ToLuaMulti + 'static> StaticIter<'static, T>
impl<T: ToLuaMulti + 'static> StaticIter<'static, T>
Trait Implementations§
Source§impl<T: ToLuaMulti + 'static, I: Iterator<Item = T> + 'static> From<I> for StaticIter<'static, T>
impl<T: ToLuaMulti + 'static, I: Iterator<Item = T> + 'static> From<I> for StaticIter<'static, T>
Source§impl<'a, T> UserData for StaticIter<'a, T>
impl<'a, T> UserData for StaticIter<'a, T>
type Trans = RefCell<StaticIter<'a, T>>
Source§fn metatable(mt: UserdataRegistry<'_, Self>) -> Result<()>
fn metatable(mt: UserdataRegistry<'_, Self>) -> Result<()>
add else meta methods, and you can acquire or overwrite the generated metamethods
Source§const INDEX_USERVALUE: bool = false
const INDEX_USERVALUE: bool = false
get/set value from the first uservalue when read/write property
Source§const RAW_LEN: bool = false
const RAW_LEN: bool = false
set the
__len metamethod, if true, return the size of this userdataSource§const WEAK_REF_CACHE: bool = true
const WEAK_REF_CACHE: bool = true
set the cache table is a weaked reference if key_to_cache enabled
Source§const ACCESS_ERROR: bool = true
const ACCESS_ERROR: bool = true
whether raising error when accessing non-exists property
const METATABLE_KEY: MetatableKey = _
fn metatable_key() -> MetatableKey
Source§fn init_userdata(
this: &Self::Trans,
s: &State,
udata: &LuaUserData<'_>,
) -> Result<()>
fn init_userdata( this: &Self::Trans, s: &State, udata: &LuaUserData<'_>, ) -> Result<()>
initialize userdata on the top of lua stack
Source§fn key_to_cache(&self) -> *const ()
fn key_to_cache(&self) -> *const ()
get a pointer whose type is lightuserdata as the key in cache table
fn uservalue_count(&self, s: &State) -> i32
unsafe extern "C-unwind" fn __index(l: *mut lua_State) -> c_int
unsafe extern "C-unwind" fn __newindex(l: *mut lua_State) -> c_int
unsafe extern "C-unwind" fn __close(l: *mut lua_State) -> c_int
Auto Trait Implementations§
impl<'a, T> Freeze for StaticIter<'a, T>
impl<'a, T> !RefUnwindSafe for StaticIter<'a, T>
impl<'a, T> !Send for StaticIter<'a, T>
impl<'a, T> !Sync for StaticIter<'a, T>
impl<'a, T> Unpin for StaticIter<'a, T>
impl<'a, T> !UnwindSafe for StaticIter<'a, T>
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
Source§impl<T> ToLuaMulti for Twhere
T: ToLua,
impl<T> ToLuaMulti for Twhere
T: ToLua,
Source§const VALUE_COUNT: Option<usize> = const VALUE_COUNT: Option<usize> = Some(1);
const VALUE_COUNT: Option<usize> = const VALUE_COUNT: Option<usize> = Some(1);
Count of values to be pushed to lua stack
Source§fn push_multi(self, s: &State) -> Result<usize, Error>
fn push_multi(self, s: &State) -> Result<usize, Error>
Define how to push values onto lua stack
Source§fn value_count(&self) -> Option<usize>
fn value_count(&self) -> Option<usize>
Get the count of values to be pushed to lua stack, with self instance