pub struct HexU32(pub u32);Expand description
A u32 wrapper that serializes/deserializes as a hex string (“0x…”).
Unlike U32Hex (a serde_conv helper for use with #[serde_as]), this type
implements Serialize/Deserialize directly, making it suitable for use inside
adjacently-tagged enums and other contexts where serde_as doesn’t apply.
Tuple Fields§
§0: u32Trait Implementations§
impl Copy for HexU32
Source§impl<'de> Deserialize<'de> for HexU32
impl<'de> Deserialize<'de> for HexU32
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HexU32
Source§impl JsonSchema for HexU32
impl JsonSchema for HexU32
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for HexU32
Auto Trait Implementations§
impl Freeze for HexU32
impl RefUnwindSafe for HexU32
impl Send for HexU32
impl Sync for HexU32
impl Unpin for HexU32
impl UnsafeUnpin for HexU32
impl UnwindSafe for HexU32
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