Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prost: auto derive prost::Name #163

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/prost/cosmos.app.v1alpha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ pub struct ModuleDescriptor {
#[prost(message, repeated, tag = "3")]
pub can_migrate_from: ::prost::alloc::vec::Vec<MigrateFromInfo>,
}
impl ::prost::Name for ModuleDescriptor {
const NAME: &'static str = "ModuleDescriptor";
const PACKAGE: &'static str = "cosmos.app.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME)
}
}
/// PackageReference is a reference to a protobuf package used by a module.
#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -70,6 +77,13 @@ pub struct PackageReference {
#[prost(uint32, tag = "2")]
pub revision: u32,
}
impl ::prost::Name for PackageReference {
const NAME: &'static str = "PackageReference";
const PACKAGE: &'static str = "cosmos.app.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME)
}
}
/// MigrateFromInfo is information on a module version that a newer module
/// can migrate from.
#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
Expand All @@ -81,3 +95,10 @@ pub struct MigrateFromInfo {
#[prost(string, tag = "1")]
pub module: ::prost::alloc::string::String,
}
impl ::prost::Name for MigrateFromInfo {
const NAME: &'static str = "MigrateFromInfo";
const PACKAGE: &'static str = "cosmos.app.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.app.v1alpha1.{}", Self::NAME)
}
}
14 changes: 14 additions & 0 deletions src/prost/cosmos.auth.module.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ pub struct Module {
#[prost(string, tag = "3")]
pub authority: ::prost::alloc::string::String,
}
impl ::prost::Name for Module {
const NAME: &'static str = "Module";
const PACKAGE: &'static str = "cosmos.auth.module.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.auth.module.v1.{}", Self::NAME)
}
}
/// ModuleAccountPermission represents permissions for a module account.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand All @@ -24,3 +31,10 @@ pub struct ModuleAccountPermission {
#[prost(string, repeated, tag = "2")]
pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ModuleAccountPermission {
const NAME: &'static str = "ModuleAccountPermission";
const PACKAGE: &'static str = "cosmos.auth.module.v1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("cosmos.auth.module.v1.{}", Self::NAME)
}
}
Loading
Loading