re_viewer 0.24.1

The Rerun viewer
Documentation
use re_entity_db::EntityDb;
use re_types_core::Component;

pub(crate) fn validate_component<C: Component>(blueprint: &EntityDb) -> bool {
    let engine = blueprint.storage_engine();
    if let Some(data_type) = engine.store().lookup_datatype(&C::name()) {
        if data_type != C::arrow_datatype() {
            // If the schemas don't match, we definitely have a problem
            re_log::debug!(
                "Unexpected datatype for component {:?}.\nFound: {:#?}\nExpected: {:#?}",
                C::name(),
                data_type,
                C::arrow_datatype()
            );
            return false;
        }
    }

    true
}