Skip to main content

NodeView

Struct NodeView 

Source
#[non_exhaustive]
pub struct NodeView<'a> { /* private fields */ }
Expand description

What a RadioProfile is told about the node it is configuring.

A view rather than the mode itself, and #[non_exhaustive] on purpose. Profiles live out-of-tree, so every change to what they are handed is a breaking change for someone; passing a struct means the node can start offering a profile more of its configuration or its hardware without changing the trait’s signature again.

Mode stays exhaustive inside this crate, because there a new mode should be a compile error in the dispatch that has to handle it.

Implementations§

Source§

impl<'a> NodeView<'a>

Source

pub fn mode(&self) -> &Mode

How the node reaches the channel.

Source

pub fn session_role(&self) -> Option<SessionRole>

The node’s session role, or None for an observer.

Source

pub fn sensing_role(&self) -> SensingRole

The node’s sensing role.

Source

pub fn reporting(&self) -> Reporting

Whether the node’s measurements leave it, as configured.

Auto Trait Implementations§

§

impl<'a> Freeze for NodeView<'a>

§

impl<'a> RefUnwindSafe for NodeView<'a>

§

impl<'a> Send for NodeView<'a>

§

impl<'a> Sync for NodeView<'a>

§

impl<'a> Unpin for NodeView<'a>

§

impl<'a> UnsafeUnpin for NodeView<'a>

§

impl<'a> UnwindSafe for NodeView<'a>

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.