Struct bee_block::output::ByteCostConfigBuilder
source · [−]pub struct ByteCostConfigBuilder { /* private fields */ }Expand description
Builder for a ByteCostConfig.
Implementations
sourceimpl ByteCostConfigBuilder
impl ByteCostConfigBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new ByteCostConfigBuilder.
sourcepub fn key_factor(self, weight: u64) -> Self
pub fn key_factor(self, weight: u64) -> Self
Sets the virtual byte weight for the key fields.
sourcepub fn data_factor(self, weight: u64) -> Self
pub fn data_factor(self, weight: u64) -> Self
Sets the virtual byte weight for the data fields.
sourcepub fn finish(self) -> ByteCostConfig
pub fn finish(self) -> ByteCostConfig
Returns the built ByteCostConfig.
Trait Implementations
sourceimpl Default for ByteCostConfigBuilder
impl Default for ByteCostConfigBuilder
sourcefn default() -> ByteCostConfigBuilder
fn default() -> ByteCostConfigBuilder
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ByteCostConfigBuilder
impl<'de> Deserialize<'de> for ByteCostConfigBuilder
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 PartialEq<ByteCostConfigBuilder> for ByteCostConfigBuilder
impl PartialEq<ByteCostConfigBuilder> for ByteCostConfigBuilder
sourcefn eq(&self, other: &ByteCostConfigBuilder) -> bool
fn eq(&self, other: &ByteCostConfigBuilder) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ByteCostConfigBuilder) -> bool
fn ne(&self, other: &ByteCostConfigBuilder) -> bool
This method tests for !=.
impl Eq for ByteCostConfigBuilder
impl StructuralEq for ByteCostConfigBuilder
impl StructuralPartialEq for ByteCostConfigBuilder
Auto Trait Implementations
impl RefUnwindSafe for ByteCostConfigBuilder
impl Send for ByteCostConfigBuilder
impl Sync for ByteCostConfigBuilder
impl Unpin for ByteCostConfigBuilder
impl UnwindSafe for ByteCostConfigBuilder
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