Struct serialize_to_javascript::Options
source · pub struct Options {
pub freeze: bool,
pub buf: usize,
}
Expand description
Optional settings to pass to the templating system.
Fields§
§freeze: bool
If the parsed JSON will be frozen with Object.freeze()
.
buf: usize
Extra amount of bytes to allocate to the String buffer during serialization.
Note: This is not the total buffer size, but the extra buffer size created. By default the buffer size will already be enough to not need to allocate more than once for input that does not need escaping. Therefore, this extra buffer is more of “how many bytes of escaped characters do I want to prepare for?”
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)