Struct cardano_serialization_lib::utils::Value
source · pub struct Value { /* private fields */ }
Implementations§
source§impl Value
impl Value
pub fn from_bytes(bytes: Vec<u8>) -> Result<Value, DeserializeError>
source§impl Value
impl Value
pub fn new(coin: &Coin) -> Value
pub fn new_from_assets(multiasset: &MultiAsset) -> Value
pub fn new_with_assets(coin: &Coin, 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§
source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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 Deserialize for Value
impl Deserialize for Value
fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R> ) -> Result<Self, DeserializeError>
source§impl JsonSchema for Value
impl JsonSchema for Value
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for Value
impl Ord for Value
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn 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