Enum meshtastic::protobufs::Constants
source · #[repr(i32)]pub enum Constants {
Zero,
DataPayloadLen,
}Expand description
Shared constants between device and phone
Variants§
Zero
First enum must be zero, and we are just using this enum to pass int constants between two very different environments
DataPayloadLen
From mesh.options note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is outside of this envelope
Implementations§
source§impl Constants
impl Constants
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Constants
impl<'de> Deserialize<'de> for Constants
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Constants
impl Ord for Constants
source§impl PartialEq<Constants> for Constants
impl PartialEq<Constants> for Constants
source§impl PartialOrd<Constants> for Constants
impl PartialOrd<Constants> for Constants
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Constants
impl Eq for Constants
impl StructuralEq for Constants
impl StructuralPartialEq for Constants
Auto Trait Implementations§
impl RefUnwindSafe for Constants
impl Send for Constants
impl Sync for Constants
impl Unpin for Constants
impl UnwindSafe for Constants
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more