Registry / serialization / prost-types

prost-types

JSON →
library0.14.4rscratesunverified

Prost definitions of Protocol Buffers well-known types like Timestamp and Duration.

# Cargo.toml [dependencies] prost-types = "0.14.4"
INSTALL
IMPORT
SIG · PROST-TYPES
P
prost-types
serializationrustv0.14.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Timestamp
use prost_types::Timestamp;

Creating a protobuf Timestamp from the current system time.

use prost_types::Timestamp; use std::time::SystemTime; let now = SystemTime::now() .duration_since(SystemTime::UNIX_EPOCH) .unwrap(); let ts = Timestamp { seconds: now.as_secs() as i64, nanos: now.subsec_nanos() as i32, }; println!("Timestamp: {}s {}ns", ts.seconds, ts.nanos);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.14.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
prost-types — cargo add prost-types · libregistry