penumbra_sdk_dex/component/
flow.rs1use std::ops::{Deref, DerefMut};
2
3use penumbra_sdk_num::Amount;
4
5#[derive(Default, Clone)]
9pub struct SwapFlow((Amount, Amount));
10
11impl Deref for SwapFlow {
12 type Target = (Amount, Amount);
13
14 fn deref(&self) -> &Self::Target {
15 &self.0
16 }
17}
18
19impl DerefMut for SwapFlow {
20 fn deref_mut(&mut self) -> &mut Self::Target {
21 &mut self.0
22 }
23}
24
25impl From<(Amount, Amount)> for SwapFlow {
26 fn from(tuple: (Amount, Amount)) -> Self {
27 Self(tuple)
28 }
29}