Struct bitcoin_primitives::u256
source · pub struct u256 {
pub blob: BaseBlob<256>,
}
Expand description
| 256-bit opaque blob. | | ———– | @note | | This type is called uint256 for historical | reasons only. It is an opaque blob of | 256 bits and has no integer operations. | Use arith_uint256 if those are required. |
Fields§
§blob: BaseBlob<256>
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for u256
impl<'de> Deserialize<'de> for u256
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 From<&String> for u256
impl From<&String> for u256
| uint256 from std::string. | | This is a separate function because | the constructor uint256(const std::string | &str) can result in dangerously catching | uint256(0) via std::string(const | char*). |
source§impl From<*const u8> for u256
impl From<*const u8> for u256
| uint256 from const char . | | This is a separate function because | the constructor uint256(const char) | can result in dangerously catching | uint256(0). |
source§impl Ord for u256
impl Ord for u256
source§impl PartialEq<u256> for u256
impl PartialEq<u256> for u256
source§impl PartialOrd<u256> for u256
impl PartialOrd<u256> for u256
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for u256
impl Send for u256
impl StructuralEq for u256
impl StructuralPartialEq for u256
impl Sync for u256
Auto Trait Implementations§
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more