pub enum Typ {
Scalar(ScalarTyp),
Array(u32, &'static Typ),
Vec(&'static Typ),
Optional(&'static Typ),
SimpleEnum(SimpleEnumType),
Struct(StructType),
Enum(EnumType),
Custom(&'static str, &'static [Typ]),
}Variants§
Scalar(ScalarTyp)
Array(u32, &'static Typ)
Vec(&'static Typ)
Optional(&'static Typ)
SimpleEnum(SimpleEnumType)
Struct(StructType)
Enum(EnumType)
Custom(&'static str, &'static [Typ])
Implementations§
Source§impl Typ
impl Typ
Sourcepub fn h(&self) -> u64
pub fn h(&self) -> u64
Schema hash persisted in armdb (db.info/CollectionInfo) and checked on
open, and used as the schema-negotiation fast-path hint.
The traversal is pointer-width-independent by construction: it only ever
feeds fixed-width bytes into the hasher (u8 tags, u64 LE lengths, u32 LE
scalar counts, raw string bytes). It deliberately does NOT use derive
std::hash::Hash, whose [T] length prefix (write_usize) and enum
discriminant (write_isize) differ between wasm32 and 64-bit targets.
Byte output MUST stay stable; drift is caught by the golden test below.
Trait Implementations§
impl Copy for Typ
impl StructuralPartialEq for Typ
Auto Trait Implementations§
impl Freeze for Typ
impl RefUnwindSafe for Typ
impl Send for Typ
impl Sync for Typ
impl Unpin for Typ
impl UnsafeUnpin for Typ
impl UnwindSafe for Typ
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