Struct cardano_serialization_lib::utils::Value
source · [−]pub struct Value { /* private fields */ }
Implementations
sourceimpl Value
impl Value
pub fn from_bytes(bytes: Vec<u8>) -> Result<Value, DeserializeError>
sourceimpl Value
impl Value
pub fn new(coin: &Coin) -> Value
pub fn new_from_assets(multiasset: &MultiAsset) -> Value
pub fn zero() -> Value
pub fn is_zero(&self) -> bool
pub fn coin(&self) -> Coin
pub fn set_coin(&mut self, coin: &Coin)
pub fn multiasset(&self) -> Option<MultiAsset>
pub fn set_multiasset(&mut self, multiasset: &MultiAsset)
pub fn checked_add(&self, rhs: &Value) -> Result<Value, JsError>
pub fn checked_sub(&self, rhs_value: &Value) -> Result<Value, JsError>
pub fn clamped_sub(&self, rhs_value: &Value) -> Value
Trait Implementations
sourceimpl Deserialize for Value
impl Deserialize for Value
fn deserialize<R: BufRead + Seek>(
raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
sourceimpl Ord for Value
impl Ord for Value
sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Value
impl Serialize for Value
fn serialize<'se, W: Write>(
&self,
serializer: &'se mut Serializer<W>
) -> Result<&'se mut Serializer<W>>
impl Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more