pub struct LazyTableWriter<'t> { /* private fields */ }
Expand description
A TableWriter that performs validation on demand
This has no overhead when not actively using tables, but after a few accesses the repeated null checks might add up
Implementations§
Source§impl<'t> LazyTableWriter<'t>
impl<'t> LazyTableWriter<'t>
Sourcepub fn validate(&self) -> Result<ValidatedTableWriter<'_>, TableError>
pub fn validate(&self) -> Result<ValidatedTableWriter<'_>, TableError>
Validate all vtable entries and skip further NULL checks
This method validates all possible vtable methods to make future
table accesses faster. If your plugin method does more than a few
(say, 10) calls to methods that take a TableWriter
, it might be
faster to get a ValidatedTableWriter
Trait Implementations§
Auto Trait Implementations§
impl<'t> Freeze for LazyTableWriter<'t>
impl<'t> RefUnwindSafe for LazyTableWriter<'t>
impl<'t> !Send for LazyTableWriter<'t>
impl<'t> !Sync for LazyTableWriter<'t>
impl<'t> Unpin for LazyTableWriter<'t>
impl<'t> UnwindSafe for LazyTableWriter<'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