#[non_exhaustive]pub struct NefFile {
pub header: NefHeader,
pub method_tokens: Vec<MethodToken>,
pub script: Vec<u8>,
pub checksum: u32,
}Expand description
Parsed NEF container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.header: NefHeaderHeader section.
method_tokens: Vec<MethodToken>Method token table.
script: Vec<u8>Script bytecode.
checksum: u32Checksum stored in the container.
Implementations§
Source§impl NefFile
impl NefFile
Sourcepub fn payload_len(&self) -> usize
pub fn payload_len(&self) -> usize
Length of the payload included in the checksum calculation.
Sourcepub fn script_hash(&self) -> [u8; 20]
pub fn script_hash(&self) -> [u8; 20]
Hash160 of the script (little-endian) as used for the contract script hash.
Sourcepub fn script_hash_le(&self) -> [u8; 20]
👎Deprecated since 0.5.1: use script_hash() instead, which is identical
pub fn script_hash_le(&self) -> [u8; 20]
script_hash() instead, which is identicalHash160 of the script (little-endian) as used for the contract script hash.
Sourcepub fn script_hash_be(&self) -> [u8; 20]
pub fn script_hash_be(&self) -> [u8; 20]
Script hash in big-endian form (for explorer comparisons).
Trait Implementations§
impl Eq for NefFile
impl StructuralPartialEq for NefFile
Auto Trait Implementations§
impl Freeze for NefFile
impl RefUnwindSafe for NefFile
impl Send for NefFile
impl Sync for NefFile
impl Unpin for NefFile
impl UnwindSafe for NefFile
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.