Skip to main content

SubBand

Struct SubBand 

Source
pub struct SubBand {
    pub start_hz: u32,
    pub end_hz: u32,
    pub duty_cycle_permille: u32,
    pub max_eirp_dbm: i8,
}
Expand description

A stretch of spectrum with its own transmit limits.

Europe divides its band into sub-bands whose duty cycles and power ceilings differ, so a plan reports them per frequency rather than once.

Fields§

§start_hz: u32

The lowest frequency in the sub-band, in hertz, inclusive.

§end_hz: u32

The highest frequency in the sub-band, in hertz, inclusive.

§duty_cycle_permille: u32

The share of time a transmitter may occupy the band, in parts per thousand.

§max_eirp_dbm: i8

The power ceiling in the sub-band, in dBm EIRP.

Implementations§

Source§

impl SubBand

Source

pub const fn new( start_hz: u32, end_hz: u32, duty_cycle_permille: u32, max_eirp_dbm: i8, ) -> Self

Builds a sub-band.

§Arguments
  • start_hz - the lowest frequency, inclusive.
  • end_hz - the highest frequency, inclusive.
  • duty_cycle_permille - the duty-cycle limit in parts per thousand.
  • max_eirp_dbm - the power ceiling in dBm EIRP.
§Returns

The sub-band.

Source

pub const fn contains(&self, frequency_hz: u32) -> bool

Reports whether a frequency falls inside this sub-band.

§Arguments
  • frequency_hz - the frequency to test.
§Returns

true when the frequency is within the sub-band, inclusive of both ends.

Trait Implementations§

Source§

impl Clone for SubBand

Source§

fn clone(&self) -> SubBand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SubBand

Source§

impl Debug for SubBand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SubBand

Source§

impl PartialEq for SubBand

Source§

fn eq(&self, other: &SubBand) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SubBand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.