pub struct BuilderFee(/* private fields */);Expand description
Tenths of a basis point: 10 is 0.01%, 1000 is 1%.
Implementations§
Source§impl BuilderFee
impl BuilderFee
pub const ZERO: BuilderFee
pub const fn from_tenths(tenths: u64) -> BuilderFee
pub const fn tenths(self) -> u64
Sourcepub fn percent(self) -> String
pub fn percent(self) -> String
The percent string approveBuilderFee takes as maxFeeRate: 880 is 0.88%, 100 is 0.1%,
1000 is 1%. It always matches ^[0-9]+(\.[0-9]+)?%$.
Sourcepub fn from_percent(text: &str) -> Option<BuilderFee>
pub fn from_percent(text: &str) -> Option<BuilderFee>
A percent string back in tenths. None for anything that is not a
whole number of tenths of a basis point.
Trait Implementations§
Source§impl Clone for BuilderFee
impl Clone for BuilderFee
impl Copy for BuilderFee
Source§impl Debug for BuilderFee
impl Debug for BuilderFee
Source§impl Default for BuilderFee
impl Default for BuilderFee
Source§impl<'de> Deserialize<'de> for BuilderFee
impl<'de> Deserialize<'de> for BuilderFee
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
Source§impl Display for BuilderFee
impl Display for BuilderFee
impl Eq for BuilderFee
Source§impl Hash for BuilderFee
impl Hash for BuilderFee
Source§impl Ord for BuilderFee
impl Ord for BuilderFee
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for BuilderFee
impl PartialEq for BuilderFee
Source§impl PartialOrd for BuilderFee
impl PartialOrd for BuilderFee
impl StructuralPartialEq for BuilderFee
Auto Trait Implementations§
impl Freeze for BuilderFee
impl RefUnwindSafe for BuilderFee
impl Send for BuilderFee
impl Sync for BuilderFee
impl Unpin for BuilderFee
impl UnsafeUnpin for BuilderFee
impl UnwindSafe for BuilderFee
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.