pub struct ProposalShortId(pub [u8; 10]);
Expand description
The 10-byte fixed-length binary encoded as a 0x-prefixed hex string in JSON.
§Example
0xa0ef4eb5f4ceeb08a4c8
Tuple Fields§
§0: [u8; 10]
Implementations§
Source§impl ProposalShortId
impl ProposalShortId
Sourcepub fn new(inner: [u8; 10]) -> ProposalShortId
pub fn new(inner: [u8; 10]) -> ProposalShortId
Creates the proposal id from array.
Sourcepub fn into_inner(self) -> [u8; 10]
pub fn into_inner(self) -> [u8; 10]
Converts into the inner bytes array.
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<'de> Deserialize<'de> for ProposalShortId
impl<'de> Deserialize<'de> for ProposalShortId
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<'a> From<&'a ProposalShortId> for ProposalShortId
impl<'a> From<&'a ProposalShortId> for ProposalShortId
Source§fn from(core: &'a ProposalShortId) -> ProposalShortId
fn from(core: &'a ProposalShortId) -> ProposalShortId
Converts to this type from the input type.
Source§impl From<ProposalShortId> for ProposalShortId
impl From<ProposalShortId> for ProposalShortId
Source§fn from(core: ProposalShortId) -> ProposalShortId
fn from(core: ProposalShortId) -> ProposalShortId
Converts to this type from the input type.
Source§impl From<ProposalShortId> for ProposalShortId
impl From<ProposalShortId> for ProposalShortId
Source§fn from(json: ProposalShortId) -> Self
fn from(json: ProposalShortId) -> Self
Converts to this type from the input type.
Source§impl Hash for ProposalShortId
impl Hash for ProposalShortId
Source§impl JsonSchema for ProposalShortId
impl JsonSchema for ProposalShortId
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for ProposalShortId
impl PartialEq for ProposalShortId
Source§impl Serialize for ProposalShortId
impl Serialize for ProposalShortId
impl Eq for ProposalShortId
impl StructuralPartialEq 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
)