a blanket impl makes this easier
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! use satrs_core::tmtc::ccsds_distrib::{CcsdsPacketHandler, CcsdsDistributor};
|
||||
//! use satrs_core::tmtc::{ReceivesTc, ReceivesTcBase};
|
||||
//! use satrs_core::tmtc::{ReceivesTc, ReceivesTcCore};
|
||||
//! use spacepackets::{CcsdsPacket, SpHeader};
|
||||
//! use spacepackets::tc::PusTc;
|
||||
//!
|
||||
@ -84,7 +84,7 @@
|
||||
//! .expect("Casting back to concrete type failed");
|
||||
//! mutable_ref.mutable_foo();
|
||||
//! ```
|
||||
use crate::tmtc::{ReceivesCcsdsTc, ReceivesTc, ReceivesTcBase};
|
||||
use crate::tmtc::{ReceivesCcsdsTc, ReceivesTcCore};
|
||||
use alloc::boxed::Box;
|
||||
use downcast_rs::Downcast;
|
||||
use spacepackets::{ByteConversionError, CcsdsPacket, SizeMissmatch, SpHeader};
|
||||
@ -136,7 +136,7 @@ impl<E: 'static> ReceivesCcsdsTc for CcsdsDistributor<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: 'static> ReceivesTcBase for CcsdsDistributor<E> {
|
||||
impl<E: 'static> ReceivesTcCore for CcsdsDistributor<E> {
|
||||
type Error = CcsdsError<E>;
|
||||
|
||||
fn pass_tc(&mut self, tc_raw: &[u8]) -> Result<(), Self::Error> {
|
||||
@ -154,8 +154,6 @@ impl<E: 'static> ReceivesTcBase for CcsdsDistributor<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: 'static> ReceivesTc for CcsdsDistributor<E> {}
|
||||
|
||||
impl<E: 'static> CcsdsDistributor<E> {
|
||||
pub fn new(apid_handler: Box<dyn CcsdsPacketHandler<Error = E>>) -> Self {
|
||||
CcsdsDistributor { apid_handler }
|
||||
|
Reference in New Issue
Block a user