MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / de_array

Method de_array

crates/sats/src/de/impls.rs:763–768  ·  view source on GitHub ↗

Deserialize a vector and `map` it to the appropriate `ArrayValue` variant.

(
            de: D,
            map: impl FnOnce(Box<[T]>) -> ArrayValue,
        )

Source from the content-addressed store, hash-verified

761 fn deserialize<D: Deserializer<'de>>(self, deserializer: D) -> Result<Self::Output, D::Error> {
762 /// Deserialize a vector and `map` it to the appropriate `ArrayValue` variant.
763 fn de_array<'de, D: Deserializer<'de>, T: Deserialize<'de>>(
764 de: D,
765 map: impl FnOnce(Box<[T]>) -> ArrayValue,
766 ) -> Result<ArrayValue, D::Error> {
767 de.deserialize_array(BasicVecVisitor).map(<Box<[_]>>::from).map(map)
768 }
769
770 let mut ty = &*self.ty().elem_ty;
771

Callers

nothing calls this directly

Calls 2

deserialize_arrayMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected