// Copyright (c) Facebook, Inc. and its affiliates. // Copyright (c) Zefchain Labs, Inc. // SPDX-License-Identifier: Apache-2.0 use linera_base::{ data_types::{BlobContent, OracleResponse, Round}, identifiers::{BlobType, ChainDescription, Destination, GenericApplicationId}, ownership::ChainOwnership, }; use linera_chain::{ data_types::{CertificateValue, HashedCertificateValue, Medium, MessageAction}, manager::ChainManagerInfo, }; use linera_core::{data_types::CrossChainRequest, node::NodeError}; use linera_execution::{ system::{AdminOperation, Recipient, SystemChannel, SystemMessage, SystemOperation}, Message, MessageKind, Operation, }; use linera_rpc::RpcMessage; use serde_reflection::{Registry, Result, Samples, Tracer, TracerConfig}; fn get_registry() -> Result { let mut tracer = Tracer::new( TracerConfig::default() .record_samples_for_newtype_structs(true) .record_samples_for_tuple_structs(true), ); let samples = Samples::new(); // 1. Record samples for types with custom deserializers. // 2. Trace the main entry point(s) + every enum separately. tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.trace_type::(&samples)?; tracer.registry() } #[test] fn test_format() { insta::assert_yaml_snapshot!("format.yaml", get_registry().unwrap()); }