pub struct MeterProxy<L: DataLinkLayer> {
table: DirectChannelTable,
links: HashMap<Vec<u8>, L>,
}Expand description
A transparent proxy: resolves direct_id to a meter via the direct-channel
table and forwards raw request APDUs to that meter’s downstream link.
Fields§
§table: DirectChannelTable§links: HashMap<Vec<u8>, L>Implementations§
Source§impl<L: DataLinkLayer> MeterProxy<L>
impl<L: DataLinkLayer> MeterProxy<L>
Sourcepub fn new(table: DirectChannelTable) -> Self
pub fn new(table: DirectChannelTable) -> Self
Creates a proxy over the given direct-channel table.
Sourcepub fn attach(&mut self, meter_id: Vec<u8>, link: L)
pub fn attach(&mut self, meter_id: Vec<u8>, link: L)
Attaches the downstream link used to reach meter_id.
Sourcepub fn table(&self) -> &DirectChannelTable
pub fn table(&self) -> &DirectChannelTable
The direct-channel table.
Auto Trait Implementations§
impl<L> Freeze for MeterProxy<L>
impl<L> RefUnwindSafe for MeterProxy<L>where
L: RefUnwindSafe,
impl<L> Send for MeterProxy<L>where
L: Send,
impl<L> Sync for MeterProxy<L>where
L: Sync,
impl<L> Unpin for MeterProxy<L>where
L: Unpin,
impl<L> UnsafeUnpin for MeterProxy<L>
impl<L> UnwindSafe for MeterProxy<L>where
L: UnwindSafe,
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