Struct Version
pub struct Version(pub i32);
Expand description
The transaction version.
Currently, as specified by BIP-68, only version 1 and 2 are considered standard.
Standardness of the inner i32
is not an invariant because you are free to create transactions
of any version, transactions with non-standard version numbers will not be relayed by the
Bitcoin network.
Tuple Fields§
§0: i32
Implementations§
§impl Version
impl Version
pub fn non_standard(version: i32) -> Version
pub fn non_standard(version: i32) -> Version
Creates a non-standard transaction version.
pub fn is_standard(&self) -> bool
pub fn is_standard(&self) -> bool
Returns true if this transaction version number is considered standard.
Trait Implementations§
§impl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Version, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Version, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Ord for Version
impl Ord for Version
§impl PartialOrd for Version
impl PartialOrd for Version
§impl Serialize for Version
impl Serialize for Version
§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 Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more