/// Writes a protobuf registry entry to a file on disk, in the given path.
/// The file name is the key of the entry in the registry (with .pb added to the
/// end). This allows this tool to also generate the data necessary for the
/// registry canister.
///
/// # Panics
///
/// Panics if the parent_dir doesn't exist, or if the serialization fails.
Writes a protobuf registry entry to a file on disk, in the given path.
The file name is the key of the entry in the registry (with .pb added to the
end). This allows this tool to also generate the data necessary for the
registry canister.
Writes a protobuf registry entry to a file on disk in the given path . The file name is the key of the entry in the registry ( with . pb added to the end ) . This allows this tool to also generate the data necessary for the registry canister .
pub(crate) fn write_proto_to_file<P, M>(key: &str, pb: M, parent_dir: P)
where
    P: AsRef<Path> + fmt::Debug,
    M: Message + std::clone::Clone,
{
    let file_name = format!("{}.pb", key);
    write_proto_to_file_raw(&file_name, pb, parent_dir);
}
pub ( crate ) fn write_proto_to_file < P , M > ( key : & str , pb : M , parent_dir : P ) where P : AsRef < Path > + fmt :: Debug , M : Message + std :: clone :: Clone , { let file_name = format ! ( " " key ) ; write_proto_to_file_raw ( & file_name , pb , parent_dir ) ; }
Writes a protobuf registry entry to a file on disk, in the given path.
Writes a protobuf registry entry to a file on disk in the given path .
key
&str
pb
M
parent_dir
P
panics
Panics if the parent_dir doesn't exist, or if the serialization fails.
Panics if the parent_dir doesn ' t exist or if the serialization fails .