pub struct DataRate {
pub modulation: Modulation,
pub bitrate_bps: u32,
}Expand description
One data rate: how it is modulated and how fast it carries bits.
Fields§
§modulation: ModulationHow the data rate puts bits on the air.
bitrate_bps: u32The indicative physical bit rate the specification prints, in bits per second.
Implementations§
Source§impl DataRate
impl DataRate
Sourcepub const fn lr_fhss(
numerator: u8,
denominator: u8,
bandwidth_hz: u32,
bitrate_bps: u32,
) -> Self
pub const fn lr_fhss( numerator: u8, denominator: u8, bandwidth_hz: u32, bitrate_bps: u32, ) -> Self
Sourcepub fn link_settings(&self) -> Option<LinkSettings>
pub fn link_settings(&self) -> Option<LinkSettings>
Returns the link settings this data rate describes, for the airtime math.
§Returns
Some(settings) for a LoRa data rate, or None for FSK and LR-FHSS,
which this crate’s chirp-based airtime model does not describe.
Trait Implementations§
impl Copy for DataRate
impl Eq for DataRate
impl StructuralPartialEq for DataRate
Auto Trait Implementations§
impl Freeze for DataRate
impl RefUnwindSafe for DataRate
impl Send for DataRate
impl Sync for DataRate
impl Unpin for DataRate
impl UnsafeUnpin for DataRate
impl UnwindSafe for DataRate
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