pub struct LuaStream {
pub f: Option<Box<dyn Read>>,
pub closef: Option<fn(&mut LuaState) -> Result<usize, LuaError>>,
}Expand description
File-stream handle used by the IO library.
closef in C is a lua_CFunction. In Rust we store an optional closer.
Fields§
§f: Option<Box<dyn Read>>The underlying file handle. None for incompletely opened or closed streams.
closef: Option<fn(&mut LuaState) -> Result<usize, LuaError>>Optional close function (None for already-closed streams).
Auto Trait Implementations§
impl Freeze for LuaStream
impl !RefUnwindSafe for LuaStream
impl !Send for LuaStream
impl !Sync for LuaStream
impl Unpin for LuaStream
impl UnsafeUnpin for LuaStream
impl !UnwindSafe for LuaStream
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