pub struct IDiscount {
pub code: String,
pub absolute_sat: u64,
pub relative: f64,
pub overall_sat: u64,
}
Fields§
§code: String
User provided discount code label
absolute_sat: u64
Absolute discount given for this code.
relative: f64
Relative discount % given for this code.
overall_sat: u64
Overall sum of the discount calculated by fee * relative + absoluteSat
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IDiscount
impl<'de> Deserialize<'de> for IDiscount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IDiscount
impl RefUnwindSafe for IDiscount
impl Send for IDiscount
impl Sync for IDiscount
impl Unpin for IDiscount
impl UnwindSafe for IDiscount
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