You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dependencies]
prost = { version = "0.13.3", features = ["prost-derive"] }
prost-types = "0.13.3"
[build-dependencies]
prost-build = "0.13.3"
However when I try to build I get the following error messages:
error[E0277]: the trait bound `Timestamp: prost::Message` is not satisfied
--> <PROJECT_BUILD_PATH>/out/public.rs:7:28
|
7 | #[derive(Clone, PartialEq, ::prost::Message)]
| ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `Timestamp`
|
= help: the following other types implement trait `prost::Message`:
bool
i32
i64
u32
u64
f32
f64
public::Command
and 7 others
note: required by a bound in `message::encode`
--> <CARGO_PATH>\prost-0.13.3\src\encoding.rs:789:12
|
787 | pub fn encode<M>(tag: u32, msg: &M, buf: &mut impl BufMut)
| ------ required by a bound in this function
788 | where
789 | M: Message,
| ^^^^^^^ required by this bound in `encode`
= note: this error originates in the derive macro `::prost::Message` (in Nightly builds, run with -Z
macro-backtrace for more info)
This is with both rust 1.81 and 1.77.2, on Windows 10. I have tried using prost-wkt-types, setting the compile_well_known_types flag in the prost_build::Config, and setting various extern_path values to try and map the types correctly. What is frustrating is that I can see the #[derive(..., ::prost::Message)] on my instance of the Timestamp struct in the cargo registry!
Does anyone know how to fix this issue?
The text was updated successfully, but these errors were encountered:
duncanrhamill
changed the title
trait prost::Message not implemented for Timestmp
trait prost::Message not implemented for TimestampOct 4, 2024
Hello, I'm trying to use prost with a proto file that includes
google.protobuf.Timestamp
like so:I'm using prost-build with the following build script:
With these versions in my
Cargo.toml
:However when I try to build I get the following error messages:
This is with both rust
1.81
and1.77.2
, on Windows 10. I have tried usingprost-wkt-types
, setting thecompile_well_known_types
flag in theprost_build::Config
, and setting variousextern_path
values to try and map the types correctly. What is frustrating is that I can see the#[derive(..., ::prost::Message)]
on my instance of theTimestamp
struct in the cargo registry!Does anyone know how to fix this issue?
The text was updated successfully, but these errors were encountered: