Skip to main content

NoStore

Struct NoStore 

Source
pub struct NoStore;
Expand description

A no-op store that rejects all writes. Used when DTN is disabled (paired with AlwaysReachable).

Trait Implementations§

Source§

impl MessageStore for NoStore

Source§

fn write( &mut self, _target: Address, _data: &[u8], _ttl_secs: u16, _created_at_secs: u32, ) -> StoreResult

Persist a message for later delivery. Read more
Source§

fn read(&mut self, _target: Address, _buf: &mut [u8]) -> Option<usize>

Read and remove the oldest stored message for target. Copies the message into buf and returns its length. Returns None if nothing is stored for that target.
Source§

fn peek_size(&self, _target: Address) -> Option<usize>

Returns the byte length of the next message for target without removing it. Used by the driver to check if the message fits in the SRSPP buffer before reading.
Source§

fn pending_targets(&self) -> u16

Bitmap of targets that have pending messages. Bit N set = ground station N has at least one stored message.
Source§

fn expire(&mut self, _now_secs: u32)

Discard all messages whose TTL has expired. now_secs uses the same epoch as created_at_secs.

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> 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 = 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.