pub struct Integer(/* private fields */);Expand description
A newtype wrapper around i32 that dereferences to i32.
§Deref coercion
Integer implements Deref<Target = i32>, allowing &Integer to be used
wherever &i32 is expected.
use extxyz_types::Integer;
fn takes_i32(x: &i32) {}
let n = Integer::from(42);
takes_i32(&n);Trait Implementations§
impl Copy for Integer
Auto Trait Implementations§
impl Freeze for Integer
impl RefUnwindSafe for Integer
impl Send for Integer
impl Sync for Integer
impl Unpin for Integer
impl UnsafeUnpin for Integer
impl UnwindSafe for Integer
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