pub enum RadIntId {
U8,
U16,
U32,
U64,
}
Variants§
Implementations§
source§impl RadIntId
impl RadIntId
sourcepub fn bytes_for_type(&self) -> usize
pub fn bytes_for_type(&self) -> usize
Return the number of bytes required to store a value associated with this type of RadIntId.
sourcepub fn write_to<T: PrimitiveInteger, U: Write>(
&self,
v: T,
owriter: &mut U
) -> Result<()>
pub fn write_to<T: PrimitiveInteger, U: Write>( &self, v: T, owriter: &mut U ) -> Result<()>
Based on the variant of the current enum, write the value v
out using owrite
. Here, v
is bound to be some primitive
integer type. It is the responsibility of the caller to ensure
that, if v
is wider than the enum type on which this function
is called, no important information is lost by discarding the higher
order bits.
Trait Implementations§
source§impl From<RadIntId> for u8
impl From<RadIntId> for u8
Convert from a RadIntId, to the corresponding type id (u8
)
encoding.
source§impl From<u8> for RadIntId
impl From<u8> for RadIntId
source§impl PartialEq for RadIntId
impl PartialEq for RadIntId
impl Copy for RadIntId
impl Eq for RadIntId
impl StructuralPartialEq for RadIntId
Auto Trait Implementations§
impl RefUnwindSafe for RadIntId
impl Send for RadIntId
impl Sync for RadIntId
impl Unpin for RadIntId
impl UnwindSafe for RadIntId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.