pub enum IntegerType {
Int8,
Uint8,
Int16,
Uint16,
Int32,
Uint32,
Int64,
Uint64,
Unbounded,
}
Expand description
Representation of common integer types
Variants§
Implementations§
Source§impl IntegerType
impl IntegerType
pub fn is_unbounded(&self) -> bool
Sourcepub fn max_restrictive(self, rhs: IntegerType) -> IntegerType
pub fn max_restrictive(self, rhs: IntegerType) -> IntegerType
Returns the Integer type with more restrictions
- an IntegerType with a smaller set of values is considered more restrictive
- an unsigned IntegerType is considered more restrictive if the size of the set of values is equal
if equal,
self
is returned
Trait Implementations§
Source§impl Clone for IntegerType
impl Clone for IntegerType
Source§fn clone(&self) -> IntegerType
fn clone(&self) -> IntegerType
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 IntegerType
impl Debug for IntegerType
Source§impl PartialEq for IntegerType
impl PartialEq for IntegerType
Source§impl ToTokens for IntegerType
impl ToTokens for IntegerType
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Copy for IntegerType
impl StructuralPartialEq for IntegerType
Auto Trait Implementations§
impl Freeze for IntegerType
impl RefUnwindSafe for IntegerType
impl Send for IntegerType
impl Sync for IntegerType
impl Unpin for IntegerType
impl UnwindSafe for IntegerType
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
)