Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions support/mesh/mesh_protobuf/src/protofile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ pub struct FieldType<'a> {
annotation: &'a str,
}

#[cfg_attr(not(feature = "std"), expect(dead_code))]
#[derive(Debug, Copy, Clone)]
enum SequenceType<'a> {
Optional,
Repeated,
Map(&'a str),
}

#[cfg_attr(not(feature = "std"), expect(dead_code))]
#[derive(Debug, Copy, Clone)]
enum FieldKind<'a> {
Builtin(&'a str),
Expand Down Expand Up @@ -291,6 +293,7 @@ impl<'a> FieldType<'a> {
}

/// A descriptor for a message field.
#[cfg_attr(not(feature = "std"), expect(dead_code))]
#[derive(Debug, Copy, Clone)]
pub struct FieldDescriptor<'a> {
field_type: FieldType<'a>,
Expand All @@ -317,6 +320,7 @@ impl<'a> FieldDescriptor<'a> {
}

/// A description of a protobuf `oneof`.
#[cfg_attr(not(feature = "std"), expect(dead_code))]
#[derive(Debug, Copy, Clone)]
pub struct OneofDescriptor<'a> {
name: &'a str,
Expand All @@ -332,6 +336,7 @@ impl<'a> OneofDescriptor<'a> {

/// A message descriptor.
#[derive(Debug, Copy, Clone)]
#[cfg_attr(not(feature = "std"), expect(dead_code))]
pub struct MessageDescriptor<'a> {
comment: &'a str,
name: &'a str,
Expand Down
2 changes: 2 additions & 0 deletions support/mesh/mesh_protobuf/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::table::DescribeTable;
use crate::table::TableEncoder;
use core::time::Duration;
use mesh_protobuf::Protobuf;
#[cfg(feature = "std")]
use thiserror::Error;

const NANOS_PER_SEC: u32 = 1_000_000_000;
Expand Down Expand Up @@ -66,6 +67,7 @@ impl From<std::time::SystemTime> for Timestamp {
}
}

#[cfg(feature = "std")]
#[derive(Debug, Error)]
#[error("timestamp out of range for system time")]
pub struct TimestampOutOfRange;
Expand Down
Loading