Skip to main content

qualia_core_db/semantic_instruments/
visual.rs

1//! Demo `.10d` badge visual: a valid header so the collectable is a 10D handle.
2//!
3//! This is a **placeholder manifold**, not a finished animated mesh. SI-09 can
4//! replace it with an authored badge. Axis `t` is present in the header taxonomy
5//! so later frames/animation remain in-format.
6
7use crate::container_10d::{Container10dHeader, HEADER_BYTE_SIZE};
8
9/// Media type recorded on the manifest for a `.10d` badge.
10pub const VISUAL_MEDIA_TYPE: &str = "application/vnd.qualia.10d";
11
12/// A 64-byte valid `.10d` v1 header (Refuse default disposition). No section
13/// table — inspectable as a living-container stub, not as artwork-as-proof.
14pub fn demo_badge_10d() -> [u8; HEADER_BYTE_SIZE] {
15    Container10dHeader::proposed().encode_to_vec64()
16}
17
18#[cfg(test)]
19mod tests {
20    use super::*;
21    use crate::container_10d::{Container10dHeader, MAGIC_10D};
22
23    #[test]
24    fn demo_visual_parses_as_10d_header() {
25        let bytes = demo_badge_10d();
26        assert_eq!(&bytes[..4], &MAGIC_10D);
27        Container10dHeader::parse(&bytes).expect("valid 10d header");
28    }
29}