pub struct WriteContext<'a> {
pub writer: Writer<'a>,
pub ref_writer: RefWriter,
/* private fields */
}Expand description
Serialization state container used on a single thread at a time. Sharing the same instance across threads simultaneously causes undefined behavior.
Fields§
§writer: Writer<'a>§ref_writer: RefWriterImplementations§
Source§impl<'a> WriteContext<'a>
impl<'a> WriteContext<'a>
pub fn new(type_resolver: TypeResolver, config: Config) -> WriteContext<'a>
pub fn attach_writer(&mut self, writer: Writer<'a>)
pub fn detach_writer(&mut self)
Sourcepub fn get_type_resolver(&self) -> &TypeResolver
pub fn get_type_resolver(&self) -> &TypeResolver
Get type resolver
pub fn get_type_info(&self, type_id: &TypeId) -> Result<Rc<TypeInfo>, Error>
Sourcepub fn is_compatible(&self) -> bool
pub fn is_compatible(&self) -> bool
Check if compatible mode is enabled
Check if meta sharing is enabled
Sourcepub fn is_compress_string(&self) -> bool
pub fn is_compress_string(&self) -> bool
Check if string compression is enabled
Sourcepub fn is_check_struct_version(&self) -> bool
pub fn is_check_struct_version(&self) -> bool
Check if class version checking is enabled