Skip to main content

DbspSerializer

Struct DbspSerializer 

Source
pub struct DbspSerializer<'a> { /* private fields */ }
Expand description

The rkyv::ser::Serializer used by DBSP.

Trait Implementations§

Source§

impl Fallible for DbspSerializer<'_>

Source§

impl ScratchSpace for DbspSerializer<'_>

Source§

unsafe fn push_scratch( &mut self, layout: Layout, ) -> Result<NonNull<[u8]>, Self::Error>

Allocates scratch space of the requested size. Read more
Source§

unsafe fn pop_scratch( &mut self, ptr: NonNull<u8>, layout: Layout, ) -> Result<(), Self::Error>

Deallocates previously allocated scratch space. Read more
Source§

impl Serialize<DbspSerializer<'_>> for Box<DynData>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T> Serialize<DbspSerializer<'_>> for Box<DynDataTyped<T>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T> Serialize<DbspSerializer<'_>> for Box<DynOpt<T>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T1, T2> Serialize<DbspSerializer<'_>> for Box<DynPair<T1, T2>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T1, T2> Serialize<DbspSerializer<'_>> for Box<DynPairs<T1, T2>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T> Serialize<DbspSerializer<'_>> for Box<DynSet<T>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T> Serialize<DbspSerializer<'_>> for Box<DynVec<T>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl Serialize<DbspSerializer<'_>> for Box<DynWeight>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T> Serialize<DbspSerializer<'_>> for Box<DynWeightTyped<T>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T1, T2> Serialize<DbspSerializer<'_>> for Box<DynWeightedPairs<T1, T2>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T, D> Serialize<DbspSerializer<'_>> for TypedBox<T, D>
where T: DBData + Erase<D>, D: DataTrait + ?Sized,

Source§

fn serialize( &self, serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<T, R> Serialize<DbspSerializer<'_>> for Box<DynAverage<T, R>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<VTrait, UTrait> Serialize<DbspSerializer<'_>> for Box<dyn UpdateTrait<VTrait, UTrait>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<KTrait, VTrait> Serialize<DbspSerializer<'_>> for Box<DynNeighborhoodDescr<KTrait, VTrait>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<TS, A> Serialize<DbspSerializer<'_>> for Box<dyn ChildPtrTrait<TS, A>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<TS, A> Serialize<DbspSerializer<'_>> for Box<dyn TreeNodeTrait<TS, A>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<TS, A> Serialize<DbspSerializer<'_>> for Box<dyn TreeNodeUpdateTrait<TS, A>>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<K: DataTrait + ?Sized, R: WeightTrait + ?Sized> Serialize<DbspSerializer<'_>> for FileWSet<K, R>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<K, V, R, O> Serialize<DbspSerializer<'_>> for VecIndexedWSet<K, V, R, O>
where K: DataTrait + ?Sized, V: DataTrait + ?Sized, R: WeightTrait + ?Sized, O: OrdOffset,

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<K, T, R, O> Serialize<DbspSerializer<'_>> for VecKeyBatch<K, T, R, O>
where K: DataTrait + ?Sized, T: Timestamp, R: WeightTrait + ?Sized, O: OrdOffset,

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<K, V, T, R, O> Serialize<DbspSerializer<'_>> for VecValBatch<K, V, T, R, O>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl<K: DataTrait + ?Sized, R: WeightTrait + ?Sized> Serialize<DbspSerializer<'_>> for VecWSet<K, R>

Source§

fn serialize( &self, _serializer: &mut DbspSerializer<'_>, ) -> Result<Self::Resolver, <DbspSerializer<'_> as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl Serializer for DbspSerializer<'_>

Source§

fn pos(&self) -> usize

Returns the current position of the serializer.
Source§

fn write(&mut self, bytes: &[u8]) -> Result<(), Self::Error>

Attempts to write the given bytes to the serializer.
Source§

fn pad(&mut self, padding: usize) -> Result<(), Self::Error>

Advances the given number of bytes as padding.
Source§

fn align(&mut self, align: usize) -> Result<usize, Self::Error>

Aligns the position of the serializer to the given alignment.
Source§

fn align_for<T>(&mut self) -> Result<usize, Self::Error>

Aligns the position of the serializer to be suitable to write the given type.
Source§

unsafe fn resolve_aligned<T>( &mut self, value: &T, resolver: <T as Archive>::Resolver, ) -> Result<usize, Self::Error>
where T: Archive + ?Sized,

Resolves the given value with its resolver and writes the archived type. Read more
Source§

fn serialize_value<T>(&mut self, value: &T) -> Result<usize, Self::Error>
where T: Serialize<Self>,

Archives the given object and returns the position it was archived at.
Source§

unsafe fn resolve_unsized_aligned<T>( &mut self, value: &T, to: usize, metadata_resolver: <T as ArchiveUnsized>::MetadataResolver, ) -> Result<usize, Self::Error>
where T: ArchiveUnsized + ?Sized,

Resolves the given reference with its resolver and writes the archived reference. Read more
Source§

fn serialize_unsized_value<T>( &mut self, value: &T, ) -> Result<usize, Self::Error>
where T: SerializeUnsized<Self> + ?Sized,

Archives a reference to the given object and returns the position it was archived at.
Source§

impl SharedSerializeRegistry for DbspSerializer<'_>

Source§

fn get_shared_ptr(&self, value: *const u8) -> Option<usize>

Gets the position of a previously-added shared pointer. Read more
Source§

fn add_shared_ptr( &mut self, value: *const u8, pos: usize, ) -> Result<(), Self::Error>

Adds the position of a shared pointer to the registry.
Source§

fn get_shared<T>(&self, value: &T) -> Option<usize>
where T: ?Sized,

Gets the position of a previously-added shared value. Read more
Source§

fn add_shared<T>(&mut self, value: &T, pos: usize) -> Result<(), Self::Error>
where T: ?Sized,

Adds the position of a shared value to the registry.
Source§

fn serialize_shared<T>(&mut self, value: &T) -> Result<usize, Self::Error>
where T: SerializeUnsized<Self> + ?Sized, Self: Serializer,

Archives the given shared value and returns its position. If the value has already been added then it returns the position of the previously added value.

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for DbspSerializer<'a>

§

impl<'a> Freeze for DbspSerializer<'a>

§

impl<'a> RefUnwindSafe for DbspSerializer<'a>

§

impl<'a> Send for DbspSerializer<'a>

§

impl<'a> Sync for DbspSerializer<'a>

§

impl<'a> Unpin for DbspSerializer<'a>

§

impl<'a> UnsafeUnpin for DbspSerializer<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> AsAny for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more