Struct identity_iota::iota::block::output::RentStructure
source · pub struct RentStructure { /* private fields */ }
Expand description
Specifies the current parameters for the byte cost computation.
Implementations§
source§impl RentStructure
impl RentStructure
sourcepub fn new(
byte_cost: u32,
byte_factor_key: u8,
byte_factor_data: u8
) -> RentStructure
pub fn new( byte_cost: u32, byte_factor_key: u8, byte_factor_data: u8 ) -> RentStructure
Creates a new RentStructure
.
sourcepub fn with_byte_cost(self, byte_cost: u32) -> RentStructure
pub fn with_byte_cost(self, byte_cost: u32) -> RentStructure
Sets the byte cost for the storage deposit.
sourcepub fn with_byte_factor_key(self, byte_factor_key: u8) -> RentStructure
pub fn with_byte_factor_key(self, byte_factor_key: u8) -> RentStructure
Sets the virtual byte weight for the key fields.
sourcepub fn with_byte_factor_data(self, byte_factor_data: u8) -> RentStructure
pub fn with_byte_factor_data(self, byte_factor_data: u8) -> RentStructure
Sets the virtual byte weight for the data fields.
sourcepub fn byte_cost(&self) -> u32
pub fn byte_cost(&self) -> u32
Returns the byte cost of the RentStructure
.
sourcepub fn byte_factor_key(&self) -> u8
pub fn byte_factor_key(&self) -> u8
Returns the byte factor key of the RentStructure
.
sourcepub fn byte_factor_data(&self) -> u8
pub fn byte_factor_data(&self) -> u8
Returns the byte factor data of the RentStructure
.
sourcepub fn byte_offset(&self) -> u32
pub fn byte_offset(&self) -> u32
Returns the byte offset of the RentStructure
.
Trait Implementations§
source§impl Clone for RentStructure
impl Clone for RentStructure
source§fn clone(&self) -> RentStructure
fn clone(&self) -> RentStructure
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RentStructure
impl Debug for RentStructure
source§impl Default for RentStructure
impl Default for RentStructure
source§fn default() -> RentStructure
fn default() -> RentStructure
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RentStructure
impl<'de> Deserialize<'de> for RentStructure
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RentStructure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<RentStructure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<RentStructure> for OutputBuilderAmountDto
impl From<RentStructure> for OutputBuilderAmountDto
source§fn from(original: RentStructure) -> OutputBuilderAmountDto
fn from(original: RentStructure) -> OutputBuilderAmountDto
Converts to this type from the input type.
source§impl Ord for RentStructure
impl Ord for RentStructure
source§fn cmp(&self, other: &RentStructure) -> Ordering
fn cmp(&self, other: &RentStructure) -> Ordering
1.21.0 · 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
source§impl Packable for RentStructure
impl Packable for RentStructure
§type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
§type UnpackVisitor = ()
type UnpackVisitor = ()
FIXME: docs
source§fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
Packs this value into the given
Packer
.source§fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<RentStructure as Packable>::UnpackVisitor
) -> Result<RentStructure, UnpackError<<RentStructure as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<RentStructure as Packable>::UnpackVisitor
) -> Result<RentStructure, UnpackError<<RentStructure as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
Unpacks this value from the given
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for RentStructure
impl PartialEq for RentStructure
source§fn eq(&self, other: &RentStructure) -> bool
fn eq(&self, other: &RentStructure) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RentStructure
impl PartialOrd for RentStructure
source§fn partial_cmp(&self, other: &RentStructure) -> Option<Ordering>
fn partial_cmp(&self, other: &RentStructure) -> Option<Ordering>
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 moresource§impl Serialize for RentStructure
impl Serialize for RentStructure
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RentStructure
impl Eq for RentStructure
impl StructuralPartialEq for RentStructure
Auto Trait Implementations§
impl Freeze for RentStructure
impl RefUnwindSafe for RentStructure
impl Send for RentStructure
impl Sync for RentStructure
impl Unpin for RentStructure
impl UnwindSafe for RentStructure
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
source§fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize
Self
from a serde_json::Value
.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
].
source§fn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
] skipping some syntatical checks.
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using
pack
.source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
source§fn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize
self
as a serde_json::Value
.