Struct exonum::blockchain::TxLocation
[−]
[src]
pub struct TxLocation { /* fields omitted */ }
Transaction location in block.
Methods
impl TxLocation
[src]
fn new(block_height: Height, position_in_block: u64) -> TxLocation
[src]
Creates a new instance with given parameters.
fn hash(&self) -> Hash
[src]
Hashes data as a raw byte array and returns the resulting hash.
fn block_height(&self) -> Height
[src]
Height of block in the blockchain.
fn position_in_block(&self) -> u64
[src]
Index in block.
Trait Implementations
impl Clone for TxLocation
[src]
fn clone(&self) -> TxLocation
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for TxLocation
[src]
fn eq(&self, __arg_0: &TxLocation) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TxLocation) -> bool
[src]
This method tests for !=
.
impl<'a> Field<'a> for TxLocation
[src]
unsafe fn read(buffer: &'a [u8], from: Offset, to: Offset) -> Self
[src]
Read Field from buffer, with given position, beware of memory unsafety, you should check
Field
before read
. Read more
fn write(&self, buffer: &mut Vec<u8>, from: Offset, to: Offset)
[src]
Write Field to buffer, in given position write
doesn't lead to memory unsafety. Read more
fn check(
buffer: &'a [u8],
from_st_val: CheckedOffset,
to_st_val: CheckedOffset,
latest_segment: CheckedOffset
) -> Result
[src]
buffer: &'a [u8],
from_st_val: CheckedOffset,
to_st_val: CheckedOffset,
latest_segment: CheckedOffset
) -> Result
Checks if data in the buffer could be deserialized. Returns an index of latest data seen. Read more
fn field_size() -> Offset
[src]
Field's header size
impl StorageValue for TxLocation
[src]
fn into_bytes(self) -> Vec<u8>
[src]
Serialize a value into a vector of bytes.
fn from_bytes(v: Cow<[u8]>) -> Self
[src]
Deserialize a value from bytes.
fn hash(&self) -> Hash
[src]
Returns a hash of the value. Read more
impl Debug for TxLocation
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl ExonumJson for TxLocation
[src]
fn deserialize_field<B>(
value: &Value,
buffer: &mut B,
from: Offset,
to: Offset
) -> Result<(), Box<Error>> where
B: WriteBufferWrapper,
[src]
value: &Value,
buffer: &mut B,
from: Offset,
to: Offset
) -> Result<(), Box<Error>> where
B: WriteBufferWrapper,
write deserialized field in buffer on place.
fn serialize_field(&self) -> Result<Value, Box<Error>>
[src]
serialize field as json::Value
impl ExonumJsonDeserialize for TxLocation
[src]
impl<'de> Deserialize<'de> for TxLocation
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more