Struct ethcore_light::net::buffer_flow::Buffer
[−]
[src]
pub struct Buffer { /* fields omitted */ }
Buffer value.
Produced and recharged using FlowParams
.
Definitive updates can be made as well -- these will reset the recharge
point to the time of the update.
Methods
impl Buffer
[src]
fn current(&self) -> U256
Get the current buffer value.
fn update_to(&mut self, value: U256)
Make a definitive update. This will be the value obtained after receiving a response to a request.
fn deduct_cost(&mut self, cost: U256) -> Result<(), Error>
Attempt to apply the given cost to the buffer.
If successful, the cost will be deducted successfully.
If unsuccessful, the structure will be unaltered an an error will be produced.
Trait Implementations
impl Debug for Buffer
[src]
impl Clone for Buffer
[src]
fn clone(&self) -> Buffer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Buffer
[src]
fn eq(&self, __arg_0: &Buffer) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Buffer) -> bool
This method tests for !=
.