pub struct LexBuffer { /* private fields */ }Expand description
Placeholder for LexBuffer from lua_vm::zio.
TODO(port): replace with use lua_vm::zio::LexBuffer in Phase B.
types.tsv: Mbuffer → LexBuffer
Implementations§
Source§impl LexBuffer
impl LexBuffer
pub fn new() -> Self
Sourcepub fn truncate_by(&mut self, i: usize)
pub fn truncate_by(&mut self, i: usize)
macros.tsv: luaZ_buffremove → buf.truncate_by(i)
Sourcepub fn resize(
&mut self,
_state: &mut LuaState,
size: usize,
) -> Result<(), LuaError>
pub fn resize( &mut self, _state: &mut LuaState, size: usize, ) -> Result<(), LuaError>
allocated capacity. In C this changes buffsize, not the live byte
count n. The Rust analogue therefore manipulates Vec::capacity,
never Vec::len (otherwise push_byte would write past the live
content and leave embedded zero padding inside the token text).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexBuffer
impl RefUnwindSafe for LexBuffer
impl Send for LexBuffer
impl Sync for LexBuffer
impl Unpin for LexBuffer
impl UnsafeUnpin for LexBuffer
impl UnwindSafe for LexBuffer
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