diff --git a/codegen/Dockerfile b/codegen/Dockerfile index 4c1dc560..6aab1a1f 100644 --- a/codegen/Dockerfile +++ b/codegen/Dockerfile @@ -28,7 +28,7 @@ RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81.0 --profile minimal; \ . $HOME/.cargo/env; \ - cargo install protoc-gen-prost@0.4.0 protoc-gen-prost-crate@0.4.1 protoc-gen-tonic@0.4.1 + cargo install --locked protoc-gen-prost@0.4.0 protoc-gen-prost-crate@0.4.1 protoc-gen-tonic@0.4.1 ENV PATH="${PATH}:/root/.cargo/bin" diff --git a/rust/src/google.rpc.rs b/rust/src/google.rpc.rs index c7ec9a85..cfb26b3f 100644 --- a/rust/src/google.rpc.rs +++ b/rust/src/google.rpc.rs @@ -7,6 +7,7 @@ /// /// You can find out more about this error model and how to work with it in the /// [API Design Guide](). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Status { /// The status code, which should be an enum value of diff --git a/rust/src/p4.config.v1.rs b/rust/src/p4.config.v1.rs index 4055ca0b..5e5b635e 100644 --- a/rust/src/p4.config.v1.rs +++ b/rust/src/p4.config.v1.rs @@ -34,6 +34,7 @@ /// message and refer to the types by name in the P4DataTypeSpec message. We also /// support annotations for these type specs which can be useful, e.g. to /// identify well-known headers (such as ipv4). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4TypeInfo { #[prost(map="string, message", tag="1")] @@ -52,6 +53,7 @@ pub struct P4TypeInfo { pub new_types: ::std::collections::HashMap<::prost::alloc::string::String, P4NewTypeSpec>, } /// Describes a P4_16 type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4DataTypeSpec { #[prost(oneof="p4_data_type_spec::TypeSpec", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")] @@ -59,7 +61,8 @@ pub struct P4DataTypeSpec { } /// Nested message and enum types in `P4DataTypeSpec`. pub mod p4_data_type_spec { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum TypeSpec { #[prost(message, tag="1")] Bitstring(super::P4BitstringLikeTypeSpec), @@ -87,6 +90,7 @@ pub mod p4_data_type_spec { NewType(super::P4NamedType), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4NamedType { #[prost(string, tag="1")] @@ -94,12 +98,15 @@ pub struct P4NamedType { } /// Empty message as no type information needed, just used as a placeholder in /// the oneof to identify boolean types. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4BoolType { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4ErrorType { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4BitstringLikeTypeSpec { /// Useful to identify well-known types, such as IP address or Ethernet MAC @@ -117,7 +124,8 @@ pub struct P4BitstringLikeTypeSpec { } /// Nested message and enum types in `P4BitstringLikeTypeSpec`. pub mod p4_bitstring_like_type_spec { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum TypeSpec { /// bit #[prost(message, tag="1")] @@ -130,16 +138,19 @@ pub mod p4_bitstring_like_type_spec { Varbit(super::P4VarbitTypeSpec), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4BitTypeSpec { #[prost(int32, tag="1")] pub bitwidth: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4IntTypeSpec { #[prost(int32, tag="1")] pub bitwidth: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4VarbitTypeSpec { #[prost(int32, tag="1")] @@ -147,11 +158,13 @@ pub struct P4VarbitTypeSpec { } /// From the P4_16 spec: "A tuple is similar to a struct, in that it holds /// multiple values. Unlike a struct type, tuples have no named fields." +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4TupleTypeSpec { #[prost(message, repeated, tag="1")] pub members: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4StructTypeSpec { #[prost(message, repeated, tag="1")] @@ -167,7 +180,8 @@ pub struct P4StructTypeSpec { } /// Nested message and enum types in `P4StructTypeSpec`. pub mod p4_struct_type_spec { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, @@ -175,6 +189,7 @@ pub mod p4_struct_type_spec { pub type_spec: ::core::option::Option, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderTypeSpec { #[prost(message, repeated, tag="1")] @@ -190,7 +205,8 @@ pub struct P4HeaderTypeSpec { } /// Nested message and enum types in `P4HeaderTypeSpec`. pub mod p4_header_type_spec { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, @@ -198,6 +214,7 @@ pub mod p4_header_type_spec { pub type_spec: ::core::option::Option, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderUnionTypeSpec { #[prost(message, repeated, tag="1")] @@ -213,7 +230,8 @@ pub struct P4HeaderUnionTypeSpec { } /// Nested message and enum types in `P4HeaderUnionTypeSpec`. pub mod p4_header_union_type_spec { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, @@ -221,6 +239,7 @@ pub mod p4_header_union_type_spec { pub header: ::core::option::Option, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderStackTypeSpec { #[prost(message, optional, tag="1")] @@ -228,6 +247,7 @@ pub struct P4HeaderStackTypeSpec { #[prost(int32, tag="2")] pub size: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderUnionStackTypeSpec { #[prost(message, optional, tag="1")] @@ -235,6 +255,7 @@ pub struct P4HeaderUnionStackTypeSpec { #[prost(int32, tag="2")] pub size: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyValuePair { #[prost(string, tag="1")] @@ -242,11 +263,13 @@ pub struct KeyValuePair { #[prost(message, optional, tag="2")] pub value: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyValuePairList { #[prost(message, repeated, tag="1")] pub kv_pairs: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Expression { #[prost(oneof="expression::Value", tags="1, 2, 3")] @@ -254,7 +277,8 @@ pub struct Expression { } /// Nested message and enum types in `Expression`. pub mod expression { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { #[prost(string, tag="1")] StringValue(::prost::alloc::string::String), @@ -264,11 +288,13 @@ pub mod expression { BoolValue(bool), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExpressionList { #[prost(message, repeated, tag="1")] pub expressions: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StructuredAnnotation { #[prost(string, tag="1")] @@ -281,7 +307,8 @@ pub struct StructuredAnnotation { } /// Nested message and enum types in `StructuredAnnotation`. pub mod structured_annotation { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Body { #[prost(message, tag="2")] ExpressionList(super::ExpressionList), @@ -290,6 +317,7 @@ pub mod structured_annotation { } } /// Location of code relative to a given source file. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SourceLocation { /// Path to the source file (absolute or relative to the working directory). @@ -303,6 +331,7 @@ pub struct SourceLocation { } /// For "safe" enums with no underlying representation and no member integer /// values. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4EnumTypeSpec { #[prost(message, repeated, tag="1")] @@ -318,7 +347,8 @@ pub struct P4EnumTypeSpec { } /// Nested message and enum types in `P4EnumTypeSpec`. pub mod p4_enum_type_spec { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, @@ -335,6 +365,7 @@ pub mod p4_enum_type_spec { /// For serializable (or "unsafe") enums, which have an underlying type. Note /// that as per the P4_16 specification, the underlying representation can only /// be a bit type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4SerializableEnumTypeSpec { #[prost(message, optional, tag="1")] @@ -352,7 +383,8 @@ pub struct P4SerializableEnumTypeSpec { } /// Nested message and enum types in `P4SerializableEnumTypeSpec`. pub mod p4_serializable_enum_type_spec { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, @@ -370,11 +402,13 @@ pub mod p4_serializable_enum_type_spec { } /// Similar to an enum, but there is always one and only one instance per P4 /// program. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4ErrorTypeSpec { #[prost(string, repeated, tag="1")] pub members: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4NewTypeTranslation { /// the URI uniquely identifies the translation in order to enable the @@ -390,12 +424,14 @@ pub struct P4NewTypeTranslation { } /// Nested message and enum types in `P4NewTypeTranslation`. pub mod p4_new_type_translation { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SdnString { } /// The object is either represented as an unsigned integer with a bitwidth of /// `sdn_bitwidth`, or as a string. - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum SdnType { #[prost(int32, tag="2")] SdnBitwidth(i32), @@ -404,6 +440,7 @@ pub mod p4_new_type_translation { } } /// New types introduced with the "type" keyword +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4NewTypeSpec { /// for other annotations (not @p4runtime_translation) @@ -420,7 +457,8 @@ pub struct P4NewTypeSpec { } /// Nested message and enum types in `P4NewTypeSpec`. pub mod p4_new_type_spec { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Representation { /// if no @p4runtime_translation annotation present #[prost(message, tag="1")] @@ -430,6 +468,7 @@ pub mod p4_new_type_spec { TranslatedType(super::P4NewTypeTranslation), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4Info { #[prost(message, optional, tag="1")] @@ -461,6 +500,7 @@ pub struct P4Info { #[prost(message, optional, tag="200")] pub type_info: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Documentation { /// A brief description of something, e.g. one sentence @@ -473,6 +513,7 @@ pub struct Documentation { } /// Used to describe the required properties of the underlying platform. /// Added in v1.4.0 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PlatformProperties { /// The minimum number of multicast entries (i.e. multicast groups) that the @@ -491,6 +532,7 @@ pub struct PlatformProperties { } /// Top-level package documentation describing the forwarding pipeline config /// Can be used to manage multiple P4 packages. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PkgInfo { /// a definitive name for this configuration, e.g. switch.p4_v1.0 @@ -534,6 +576,7 @@ pub struct PkgInfo { } /// wrapping the enum in a message to avoid name collisions in C++, where "enum /// values are siblings of their type, not children of it" +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct P4Ids { } @@ -619,6 +662,7 @@ pub mod p4_ids { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Preamble { /// ids share the same number-space; e.g. table ids cannot overlap with counter @@ -657,6 +701,7 @@ pub struct Preamble { pub structured_annotations: ::prost::alloc::vec::Vec, } /// used to group all extern instances of the same type in one message +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Extern { /// the extern_type_id is unique for a given architecture and must be in the @@ -668,6 +713,7 @@ pub struct Extern { #[prost(message, repeated, tag="3")] pub instances: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExternInstance { #[prost(message, optional, tag="1")] @@ -677,6 +723,7 @@ pub struct ExternInstance { #[prost(message, optional, tag="2")] pub info: ::core::option::Option<::pbjson_types::Any>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MatchField { #[prost(uint32, tag="1")] @@ -742,7 +789,8 @@ pub mod match_field { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Match { #[prost(enumeration="MatchType", tag="5")] MatchType(i32), @@ -757,6 +805,7 @@ pub mod match_field { /// Arguments are matched to the id of the respective action parameter. /// TableActionCalls may be used as the default action call of a table implementation. /// Added in 1.4.0. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableActionCall { #[prost(uint32, tag="1")] @@ -766,7 +815,8 @@ pub struct TableActionCall { } /// Nested message and enum types in `TableActionCall`. pub mod table_action_call { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Argument { #[prost(uint32, tag="2")] pub param_id: u32, @@ -774,6 +824,7 @@ pub mod table_action_call { pub value: ::prost::alloc::vec::Vec, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Table { #[prost(message, optional, tag="1")] @@ -861,6 +912,7 @@ pub mod table { } } /// used to list all possible actions in a Table +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionRef { #[prost(uint32, tag="1")] @@ -908,6 +960,7 @@ pub mod action_ref { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Action { #[prost(message, optional, tag="1")] @@ -917,7 +970,8 @@ pub struct Action { } /// Nested message and enum types in `Action`. pub mod action { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Param { #[prost(uint32, tag="1")] pub id: u32, @@ -941,6 +995,7 @@ pub mod action { pub structured_annotations: ::prost::alloc::vec::Vec, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionProfile { #[prost(message, optional, tag="1")] @@ -970,21 +1025,24 @@ pub mod action_profile { /// weights that can be present across all selector groups and within a /// single selector group respectively. /// Added in v1.4.0 - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SumOfWeights { } /// indicates that `size` and `max_group_size` represent the maximum number /// of members that can be present across all selector groups and within a /// single selector group respectively. /// Added in v1.4.0 - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SumOfMembers { /// the maximum weight of each individual member in a group. #[prost(int32, tag="1")] pub max_member_weight: i32, } /// specifies the semantics of `size` and `max_group_size` above - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum SelectorSizeSemantics { /// group size is the sum of the group's weights. /// Added in v1.4.0 @@ -996,6 +1054,7 @@ pub mod action_profile { SumOfMembers(SumOfMembers), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CounterSpec { #[prost(enumeration="counter_spec::Unit", tag="1")] @@ -1038,6 +1097,7 @@ pub mod counter_spec { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Counter { #[prost(message, optional, tag="1")] @@ -1051,6 +1111,7 @@ pub struct Counter { #[prost(message, optional, tag="4")] pub index_type_name: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectCounter { #[prost(message, optional, tag="1")] @@ -1061,6 +1122,7 @@ pub struct DirectCounter { #[prost(uint32, tag="3")] pub direct_table_id: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MeterSpec { #[prost(enumeration="meter_spec::Unit", tag="1")] @@ -1147,6 +1209,7 @@ pub mod meter_spec { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Meter { #[prost(message, optional, tag="1")] @@ -1160,6 +1223,7 @@ pub struct Meter { #[prost(message, optional, tag="4")] pub index_type_name: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectMeter { #[prost(message, optional, tag="1")] @@ -1176,6 +1240,7 @@ pub struct DirectMeter { /// respectively. There can be at most one header each with these annotations. /// This message captures the info contained within these special headers, /// and used in p4runtime.proto to supply the metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ControllerPacketMetadata { /// preamble.name and preamble.id will specify header type ("packet_out" or @@ -1189,7 +1254,8 @@ pub struct ControllerPacketMetadata { } /// Nested message and enum types in `ControllerPacketMetadata`. pub mod controller_packet_metadata { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { #[prost(uint32, tag="1")] pub id: u32, @@ -1212,6 +1278,7 @@ pub mod controller_packet_metadata { pub structured_annotations: ::prost::alloc::vec::Vec, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValueSet { #[prost(message, optional, tag="1")] @@ -1222,6 +1289,7 @@ pub struct ValueSet { #[prost(int32, tag="3")] pub size: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Register { #[prost(message, optional, tag="1")] @@ -1234,6 +1302,7 @@ pub struct Register { #[prost(message, optional, tag="4")] pub index_type_name: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Digest { #[prost(message, optional, tag="1")] diff --git a/rust/src/p4.v1.rs b/rust/src/p4.v1.rs index 18e29abd..2a304213 100644 --- a/rust/src/p4.v1.rs +++ b/rust/src/p4.v1.rs @@ -1,5 +1,6 @@ // @generated // This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4Data { #[prost(oneof="p4_data::Data", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")] @@ -7,7 +8,8 @@ pub struct P4Data { } /// Nested message and enum types in `P4Data`. pub mod p4_data { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Data { /// for bit, int #[prost(bytes, tag="1")] @@ -39,6 +41,7 @@ pub mod p4_data { EnumValue(::prost::alloc::vec::Vec), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4Varbit { #[prost(bytes="vec", tag="1")] @@ -47,11 +50,13 @@ pub struct P4Varbit { #[prost(int32, tag="2")] pub bitwidth: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4StructLike { #[prost(message, repeated, tag="1")] pub members: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4Header { /// If the header is invalid (is_valid is "false"), then the bitstrings @@ -61,6 +66,7 @@ pub struct P4Header { #[prost(bytes="vec", repeated, tag="2")] pub bitstrings: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderUnion { /// An empty string indicates that none of the union members are valid and @@ -70,6 +76,7 @@ pub struct P4HeaderUnion { #[prost(message, optional, tag="2")] pub valid_header: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderStack { /// The length of this repeated field must always be equal to the compile-time @@ -77,6 +84,7 @@ pub struct P4HeaderStack { #[prost(message, repeated, tag="1")] pub entries: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct P4HeaderUnionStack { /// The length of this repeated field must always be equal to the compile-time @@ -85,6 +93,7 @@ pub struct P4HeaderUnionStack { pub entries: ::prost::alloc::vec::Vec, } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteRequest { #[prost(uint64, tag="1")] @@ -158,9 +167,11 @@ pub mod write_request { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WriteResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRequest { #[prost(uint64, tag="1")] @@ -172,11 +183,13 @@ pub struct ReadRequest { #[prost(message, repeated, tag="2")] pub entities: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadResponse { #[prost(message, repeated, tag="1")] pub entities: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Update { #[prost(enumeration="update::Type", tag="1")] @@ -219,6 +232,7 @@ pub mod update { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entity { #[prost(oneof="entity::Entity", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")] @@ -226,7 +240,8 @@ pub struct Entity { } /// Nested message and enum types in `Entity`. pub mod entity { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Entity { #[prost(message, tag="1")] ExternEntry(super::ExternEntry), @@ -254,6 +269,7 @@ pub mod entity { DigestEntry(super::DigestEntry), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExternEntry { /// the extern_type_id is unique for a given architecture and must be in the @@ -266,6 +282,7 @@ pub struct ExternEntry { #[prost(message, optional, tag="3")] pub entry: ::core::option::Option<::pbjson_types::Any>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableEntry { #[prost(uint32, tag="1")] @@ -354,7 +371,8 @@ pub struct TableEntry { } /// Nested message and enum types in `TableEntry`. pub mod table_entry { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct IdleTimeout { /// Time elapsed - in nanoseconds - since the table entry was last "hit" as /// part of a data plane table lookup. @@ -363,6 +381,7 @@ pub mod table_entry { } } /// field_match_type ::= exact | ternary | lpm | range | optional +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FieldMatch { #[prost(uint32, tag="1")] @@ -374,19 +393,22 @@ pub struct FieldMatch { pub mod field_match { /// Matches can be performed on arbitrarily-large inputs; the protobuf type /// 'bytes' is used to model arbitrarily-large values. - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Exact { #[prost(bytes="vec", tag="1")] pub value: ::prost::alloc::vec::Vec, } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Ternary { #[prost(bytes="vec", tag="1")] pub value: ::prost::alloc::vec::Vec, #[prost(bytes="vec", tag="2")] pub mask: ::prost::alloc::vec::Vec, } - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Lpm { #[prost(bytes="vec", tag="1")] pub value: ::prost::alloc::vec::Vec, @@ -396,7 +418,8 @@ pub mod field_match { } /// A Range is logically a set that contains all values numerically between /// 'low' and 'high' inclusively. - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Range { #[prost(bytes="vec", tag="1")] pub low: ::prost::alloc::vec::Vec, @@ -405,12 +428,14 @@ pub mod field_match { } /// If the Optional match should be a wildcard, the FieldMatch must be omitted. /// Otherwise, this behaves like an exact match. - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Optional { #[prost(bytes="vec", tag="1")] pub value: ::prost::alloc::vec::Vec, } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum FieldMatchType { #[prost(message, tag="2")] Exact(Exact), @@ -429,6 +454,7 @@ pub mod field_match { } } /// table_actions ::= action_specification | action_profile_specification +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableAction { #[prost(oneof="table_action::Type", tags="1, 2, 3, 4")] @@ -436,7 +462,8 @@ pub struct TableAction { } /// Nested message and enum types in `TableAction`. pub mod table_action { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Type { #[prost(message, tag="1")] Action(super::Action), @@ -448,6 +475,7 @@ pub mod table_action { ActionProfileActionSet(super::ActionProfileActionSet), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Action { #[prost(uint32, tag="1")] @@ -457,7 +485,8 @@ pub struct Action { } /// Nested message and enum types in `Action`. pub mod action { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Param { #[prost(uint32, tag="2")] pub param_id: u32, @@ -465,11 +494,13 @@ pub mod action { pub value: ::prost::alloc::vec::Vec, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionProfileActionSet { #[prost(message, repeated, tag="1")] pub action_profile_actions: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionProfileAction { #[prost(message, optional, tag="1")] @@ -481,7 +512,8 @@ pub struct ActionProfileAction { } /// Nested message and enum types in `ActionProfileAction`. pub mod action_profile_action { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum WatchKind { /// Using int32 as ports is deprecated, use watch_port instead. #[prost(int32, tag="3")] @@ -491,6 +523,7 @@ pub mod action_profile_action { } } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionProfileMember { #[prost(uint32, tag="1")] @@ -501,6 +534,7 @@ pub struct ActionProfileMember { pub action: ::core::option::Option, } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActionProfileGroup { #[prost(uint32, tag="1")] @@ -520,7 +554,8 @@ pub struct ActionProfileGroup { } /// Nested message and enum types in `ActionProfileGroup`. pub mod action_profile_group { - #[derive(Clone, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(uint32, tag="1")] pub member_id: u32, @@ -531,7 +566,8 @@ pub mod action_profile_group { } /// Nested message and enum types in `Member`. pub mod member { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum WatchKind { /// Using int32 as ports is deprecated, use watch_port instead. #[prost(int32, tag="3")] @@ -548,6 +584,7 @@ pub mod action_profile_group { /// these but we cannot use a default zero index value to do so, as zero is a /// valid index (first entry in the array). We therefore wrap the index in a /// message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Index { #[prost(int64, tag="1")] @@ -558,6 +595,7 @@ pub struct Index { /// For ReadRequest, the scope is defined as follows: /// - All meter cells for all meters if meter_id = 0 (default). /// - All meter cells for given meter_id if index is unset (default). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MeterEntry { #[prost(uint32, tag="1")] @@ -578,6 +616,7 @@ pub struct MeterEntry { /// - All meter cells for all tables if table_entry.table_id = 0. /// - All meter cells of a table if table_entry.table_id is present and /// table_entry.match is empty. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectMeterEntry { /// The associated table entry. This field is required. @@ -608,6 +647,7 @@ pub struct DirectMeterEntry { /// yellow or green depending on whether it exceeds or doesn't exceed the EBS. /// For this meter type, it must be the case that `cir == pir && cburst == /// pburst`. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MeterConfig { /// Committed information rate (units per sec) @@ -632,6 +672,7 @@ pub struct MeterConfig { /// For ReadRequest, the scope is defined as follows: /// - All counter cells for all counters if counter_id = 0 (default). /// - All counter cells for given counter_id if index is unset (default). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CounterEntry { #[prost(uint32, tag="1")] @@ -649,6 +690,7 @@ pub struct CounterEntry { /// - All counter cells for all tables if table_entry.table_id = 0. /// - All counter cells of a table if table_entry.table_id is present and /// table_entry.match is empty. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectCounterEntry { /// The associated table entry. This field is required. @@ -658,6 +700,7 @@ pub struct DirectCounterEntry { #[prost(message, optional, tag="2")] pub data: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CounterData { #[prost(int64, tag="1")] @@ -666,6 +709,7 @@ pub struct CounterData { pub packet_count: i64, } /// Added in v1.4.0 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MeterCounterData { #[prost(message, optional, tag="1")] @@ -678,6 +722,7 @@ pub struct MeterCounterData { /// ------------------------------------------------------------------------------ /// Only one instance of a Packet Replication Engine (PRE) is expected in the /// P4 pipeline. Hence, no instance id is needed to access the PRE. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketReplicationEngineEntry { #[prost(oneof="packet_replication_engine_entry::Type", tags="1, 2")] @@ -685,7 +730,8 @@ pub struct PacketReplicationEngineEntry { } /// Nested message and enum types in `PacketReplicationEngineEntry`. pub mod packet_replication_engine_entry { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Type { #[prost(message, tag="1")] MulticastGroupEntry(super::MulticastGroupEntry), @@ -694,6 +740,7 @@ pub mod packet_replication_engine_entry { } } /// Used for replicas created for cloning and multicasting actions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Replica { #[prost(uint32, tag="2")] @@ -703,7 +750,8 @@ pub struct Replica { } /// Nested message and enum types in `Replica`. pub mod replica { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum PortKind { /// Using uint32 as ports is deprecated, use port field instead. /// Deprecated in v1.4.0 @@ -720,6 +768,7 @@ pub mod replica { /// of a programmed multicast group entry. The port and instance fields of each /// replica's egress input metadata will be set to the respective values /// programmed in the multicast group entry. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MulticastGroupEntry { #[prost(uint32, tag="1")] @@ -744,6 +793,7 @@ pub struct MulticastGroupEntry { /// length is also common to all clones in the clone session. If the /// packet_length_bytes field is 0, no truncation on the clone(s) will be /// performed. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloneSessionEntry { #[prost(uint32, tag="1")] @@ -757,6 +807,7 @@ pub struct CloneSessionEntry { } /// A member in a P4 value set. Each member defines a list of matches, which can /// have different match types. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValueSetMember { #[prost(message, repeated, tag="1")] @@ -777,6 +828,7 @@ pub struct ValueSetMember { /// - All matches for all value-set entries if value_set_id = 0 /// - All matches of the value-set if a valid value_set_id is specified /// - The 'match' field must never be set in the ReadRequest +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValueSetEntry { #[prost(uint32, tag="1")] @@ -785,6 +837,7 @@ pub struct ValueSetEntry { pub members: ::prost::alloc::vec::Vec, } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterEntry { #[prost(uint32, tag="1")] @@ -796,6 +849,7 @@ pub struct RegisterEntry { } /// ------------------------------------------------------------------------------ /// Used to configure the digest extern only, not to stream digests or acks +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DigestEntry { #[prost(uint32, tag="1")] @@ -810,7 +864,8 @@ pub mod digest_entry { /// - the oldest digest in the list has been waiting for at least /// max_timeout_ns nanoseconds or we have gathered max_list_size digests /// already - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Config { /// max timeout for outstanding digest data #[prost(int64, tag="1")] @@ -824,6 +879,7 @@ pub mod digest_entry { } } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamMessageRequest { #[prost(oneof="stream_message_request::Update", tags="1, 2, 3, 4")] @@ -831,7 +887,8 @@ pub struct StreamMessageRequest { } /// Nested message and enum types in `StreamMessageRequest`. pub mod stream_message_request { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Update { #[prost(message, tag="1")] Arbitration(super::MasterArbitrationUpdate), @@ -844,6 +901,7 @@ pub mod stream_message_request { } } /// Packet sent from the controller to the switch. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketOut { #[prost(bytes="vec", tag="1")] @@ -858,6 +916,7 @@ pub struct PacketOut { /// controller, the switch must not generate digest notifications for the same /// data until a DigestListAck message with the same list_id is received or the /// ack timeout (ack_timeout_ns field in DigestEntry.Config) expires. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DigestListAck { #[prost(uint32, tag="1")] @@ -865,6 +924,7 @@ pub struct DigestListAck { #[prost(uint64, tag="2")] pub list_id: u64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamMessageResponse { #[prost(oneof="stream_message_response::Update", tags="1, 2, 3, 4, 5, 6")] @@ -872,7 +932,8 @@ pub struct StreamMessageResponse { } /// Nested message and enum types in `StreamMessageResponse`. pub mod stream_message_response { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Update { #[prost(message, tag="1")] Arbitration(super::MasterArbitrationUpdate), @@ -891,6 +952,7 @@ pub mod stream_message_response { } } /// Packet sent from the switch to the controller. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketIn { #[prost(bytes="vec", tag="1")] @@ -901,6 +963,7 @@ pub struct PacketIn { #[prost(message, repeated, tag="2")] pub metadata: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DigestList { /// identifies the digest extern instance @@ -923,6 +986,7 @@ pub struct DigestList { /// @controller_header("packet_out") and @controller_header("packet_in") /// respectively. There can be at most one header each with these annotations. /// These special headers are captured in P4Info ControllerPacketMetadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketMetadata { /// This refers to Metadata.id coming from P4Info ControllerPacketMetadata. @@ -931,6 +995,7 @@ pub struct PacketMetadata { #[prost(bytes="vec", tag="2")] pub value: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MasterArbitrationUpdate { #[prost(uint64, tag="1")] @@ -952,6 +1017,7 @@ pub struct MasterArbitrationUpdate { #[prost(message, optional, tag="4")] pub status: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Role { /// Uniquely identifies this role. @@ -970,6 +1036,7 @@ pub struct Role { #[prost(message, optional, tag="2")] pub config: ::core::option::Option<::pbjson_types::Any>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IdleTimeoutNotification { /// The only fields that are required to be set in each TableEntry are the @@ -984,6 +1051,7 @@ pub struct IdleTimeoutNotification { } /// Used by the server to asynchronously report errors which occur when /// processing StreamMessageRequest messages. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamError { /// gRPC canonical error code (see @@ -1015,7 +1083,8 @@ pub mod stream_error { /// the fields must be set (so that the client can identify which type of /// stream message triggered the error), but that field may be set to its /// default value. - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Details { #[prost(message, tag="5")] PacketOut(super::PacketOutError), @@ -1025,24 +1094,28 @@ pub mod stream_error { Other(super::StreamOtherError), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketOutError { /// Optional. The packet out message that caused the error. #[prost(message, optional, tag="1")] pub packet_out: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DigestListAckError { /// Optional. The digest list acknowledgement message that caused the error. #[prost(message, optional, tag="1")] pub digest_list_ack: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamOtherError { /// Optional. The architecture-specific stream message that caused the error. #[prost(message, optional, tag="1")] pub other: ::core::option::Option<::pbjson_types::Any>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Uint128 { /// Highest 64 bits of a 128 bit number. @@ -1053,6 +1126,7 @@ pub struct Uint128 { pub low: u64, } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetForwardingPipelineConfigRequest { #[prost(uint64, tag="1")] @@ -1137,9 +1211,11 @@ pub mod set_forwarding_pipeline_config_request { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SetForwardingPipelineConfigResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ForwardingPipelineConfig { #[prost(message, optional, tag="1")] @@ -1159,12 +1235,14 @@ pub mod forwarding_pipeline_config { /// we need to distinguish those cases where a cookie is NOT present (e.g. not /// set in the SetForwardingPipelineConfigRequest, therefore we wrap the actual /// uint64 value in a protobuf message. - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Cookie { #[prost(uint64, tag="1")] pub cookie: u64, } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetForwardingPipelineConfigRequest { #[prost(uint64, tag="1")] @@ -1213,12 +1291,14 @@ pub mod get_forwarding_pipeline_config_request { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetForwardingPipelineConfigResponse { #[prost(message, optional, tag="1")] pub config: ::core::option::Option, } /// Error message used to report a single P4-entity error for a Write RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { /// gRPC canonical error code (see @@ -1242,9 +1322,11 @@ pub struct Error { pub details: ::core::option::Option<::pbjson_types::Any>, } /// ------------------------------------------------------------------------------ +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CapabilitiesRequest { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CapabilitiesResponse { /// The full semantic version string (e.g. "1.1.0-rc.1") corresponding to the diff --git a/rust/src/p4.v1.tonic.rs b/rust/src/p4.v1.tonic.rs index 58e622c4..f3f847b5 100644 --- a/rust/src/p4.v1.tonic.rs +++ b/rust/src/p4.v1.tonic.rs @@ -23,8 +23,8 @@ pub mod p4_runtime_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -49,7 +49,7 @@ pub mod p4_runtime_client { >, , - >>::Error: Into + std::marker::Send + std::marker::Sync, + >>::Error: Into + Send + Sync, { P4RuntimeClient::new(InterceptedService::new(inner, interceptor)) } @@ -239,7 +239,7 @@ pub mod p4_runtime_server { use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with P4RuntimeServer. #[async_trait] - pub trait P4Runtime: std::marker::Send + std::marker::Sync + 'static { + pub trait P4Runtime: Send + Sync + 'static { async fn write( &self, request: tonic::Request, @@ -248,7 +248,7 @@ pub mod p4_runtime_server { type ReadStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + std::marker::Send + + Send + 'static; async fn read( &self, @@ -272,7 +272,7 @@ pub mod p4_runtime_server { type StreamChannelStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > - + std::marker::Send + + Send + 'static; async fn stream_channel( &self, @@ -290,14 +290,14 @@ pub mod p4_runtime_server { >; } #[derive(Debug)] - pub struct P4RuntimeServer { + pub struct P4RuntimeServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl P4RuntimeServer { + impl P4RuntimeServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -351,8 +351,8 @@ pub mod p4_runtime_server { impl tonic::codegen::Service> for P4RuntimeServer where T: P4Runtime, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -669,7 +669,7 @@ pub mod p4_runtime_server { } } } - impl Clone for P4RuntimeServer { + impl Clone for P4RuntimeServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -681,9 +681,7 @@ pub mod p4_runtime_server { } } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "p4.v1.P4Runtime"; - impl tonic::server::NamedService for P4RuntimeServer { - const NAME: &'static str = SERVICE_NAME; + impl tonic::server::NamedService for P4RuntimeServer { + const NAME: &'static str = "p4.v1.P4Runtime"; } }