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§
Source§impl Version
impl Version
Sourcepub fn non_standard(version: i32) -> Version
pub fn non_standard(version: i32) -> Version
Creates a non-standard transaction version.
Sourcepub fn is_standard(&self) -> bool
pub fn is_standard(&self) -> bool
Returns true if this transaction version number is considered standard.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
Source§fn 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
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)