pub struct MetaWriterResolver { /* private fields */ }Expand description
Streaming meta writer that writes TypeMeta inline during serialization. Uses the streaming protocol:
- (index << 1) | 0 for new type definition (followed by TypeMeta bytes)
- (index << 1) | 1 for reference to previously written type
Implementations§
Source§impl MetaWriterResolver
impl MetaWriterResolver
Sourcepub fn write_type_meta(
&mut self,
writer: &mut Writer<'_>,
type_id: TypeId,
type_resolver: &TypeResolver,
) -> Result<(), Error>
pub fn write_type_meta( &mut self, writer: &mut Writer<'_>, type_id: TypeId, type_resolver: &TypeResolver, ) -> Result<(), Error>
Write type meta inline using streaming protocol. Returns the index assigned to this type.
pub fn reset(&mut self)
Trait Implementations§
Source§impl Default for MetaWriterResolver
impl Default for MetaWriterResolver
Source§fn default() -> MetaWriterResolver
fn default() -> MetaWriterResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetaWriterResolver
impl RefUnwindSafe for MetaWriterResolver
impl Send for MetaWriterResolver
impl Sync for MetaWriterResolver
impl Unpin for MetaWriterResolver
impl UnwindSafe for MetaWriterResolver
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