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 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
sourceimpl<'de> Deserialize<'de> for Value
 
impl<'de> Deserialize<'de> for Value
sourcefn 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
sourceimpl Deserialize for Value
 
impl Deserialize for Value
fn deserialize<R: BufRead + Seek>(
    raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
sourceimpl JsonSchema for Value
 
impl JsonSchema for Value
sourcefn schema_name() -> String
 
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
 
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn 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 moresourceimpl Ord for Value
 
impl Ord for Value
1.21.0 · sourcefn 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 · sourcefn 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
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
    Self: Sized + PartialOrd<Self>,
 
fn clamp(self, min: Self, max: Self) -> Selfwhere
    Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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>
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 moresourceimpl 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 Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    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