pub struct ProposalShortId(/* private fields */);
Implementations§
Source§impl ProposalShortId
impl ProposalShortId
Sourcepub fn from_tx_hash(h: &Byte32) -> ProposalShortId
pub fn from_tx_hash(h: &Byte32) -> ProposalShortId
Creates a new ProposalShortId
from a transaction hash.
Sourcepub fn zero() -> ProposalShortId
pub fn zero() -> ProposalShortId
Creates a new ProposalShortId
whose bits are all zeros.
Sourcepub fn new(v: [u8; 10]) -> ProposalShortId
pub fn new(v: [u8; 10]) -> ProposalShortId
Creates a new ProposalShortId
.
Source§impl ProposalShortId
impl ProposalShortId
Sourcepub fn serialized_size() -> usize
pub fn serialized_size() -> usize
Return the serialized size
Source§impl ProposalShortId
impl ProposalShortId
pub const TOTAL_SIZE: usize = 10usize
pub const ITEM_SIZE: usize = 1usize
pub const ITEM_COUNT: usize = 10usize
pub fn nth0(&self) -> Byte
pub fn nth1(&self) -> Byte
pub fn nth2(&self) -> Byte
pub fn nth3(&self) -> Byte
pub fn nth4(&self) -> Byte
pub fn nth5(&self) -> Byte
pub fn nth6(&self) -> Byte
pub fn nth7(&self) -> Byte
pub fn nth8(&self) -> Byte
pub fn nth9(&self) -> Byte
pub fn raw_data(&self) -> Bytes
pub fn as_reader<'r>(&'r self) -> ProposalShortIdReader<'r>
Trait Implementations§
Source§impl Clone for ProposalShortId
impl Clone for ProposalShortId
Source§fn clone(&self) -> ProposalShortId
fn clone(&self) -> ProposalShortId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProposalShortId
impl Debug for ProposalShortId
Source§impl Default for ProposalShortId
impl Default for ProposalShortId
Source§fn default() -> ProposalShortId
fn default() -> ProposalShortId
Returns the “default value” for a type. Read more
Source§impl Display for ProposalShortId
impl Display for ProposalShortId
Source§impl Entity for ProposalShortId
impl Entity for ProposalShortId
const NAME: &'static str = "ProposalShortId"
type Builder = ProposalShortIdBuilder
fn new_unchecked(data: Bytes) -> ProposalShortId
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8] ⓘ
fn from_slice(slice: &[u8]) -> Result<ProposalShortId, VerificationError>
fn from_compatible_slice( slice: &[u8], ) -> Result<ProposalShortId, VerificationError>
fn new_builder() -> <ProposalShortId as Entity>::Builder
fn as_builder(self) -> <ProposalShortId as Entity>::Builder
Source§impl Hash for ProposalShortId
impl Hash for ProposalShortId
Source§impl LowerHex for ProposalShortId
impl LowerHex for ProposalShortId
Source§impl Ord for ProposalShortId
impl Ord for ProposalShortId
Source§fn cmp(&self, other: &ProposalShortId) -> Ordering
fn cmp(&self, other: &ProposalShortId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Pack<ProposalShortId> for [u8; 10]
impl Pack<ProposalShortId> for [u8; 10]
Source§fn pack(&self) -> ProposalShortId
fn pack(&self) -> ProposalShortId
Packs a rust type into binary data.
Source§impl PartialEq for ProposalShortId
impl PartialEq for ProposalShortId
Source§impl PartialOrd for ProposalShortId
impl PartialOrd for ProposalShortId
impl Eq for ProposalShortId
Auto Trait Implementations§
impl !Freeze for ProposalShortId
impl RefUnwindSafe for ProposalShortId
impl Send for ProposalShortId
impl Sync for ProposalShortId
impl Unpin for ProposalShortId
impl UnwindSafe for ProposalShortId
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
)Source§impl<T> PackVec<ProposalShortIdVec, ProposalShortId> for Twhere
T: IntoIterator<Item = ProposalShortId>,
impl<T> PackVec<ProposalShortIdVec, ProposalShortId> for Twhere
T: IntoIterator<Item = ProposalShortId>,
Source§fn pack(self) -> ProposalShortIdVec
fn pack(self) -> ProposalShortIdVec
Packs a vector of binary data into one binary data.