pub struct ShiftAmount<T> { /* private fields */ }
Expand description
A typed shift amount for shift and rotate instructions.
Implementations§
Source§impl ShiftAmount<i32>
impl ShiftAmount<i32>
Sourcepub fn new(value: i32) -> Option<Self>
pub fn new(value: i32) -> Option<Self>
Creates a new ShiftAmount
for the given value
.
Returns None
if value
causes a no-op shift.
Source§impl ShiftAmount<i64>
impl ShiftAmount<i64>
Sourcepub fn new(value: i64) -> Option<Self>
pub fn new(value: i64) -> Option<Self>
Creates a new ShiftAmount
for the given value
.
Returns None
if value
causes a no-op shift.
Trait Implementations§
Source§impl<T: Clone> Clone for ShiftAmount<T>
impl<T: Clone> Clone for ShiftAmount<T>
Source§fn clone(&self) -> ShiftAmount<T>
fn clone(&self) -> ShiftAmount<T>
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<T: Debug> Debug for ShiftAmount<T>
impl<T: Debug> Debug for ShiftAmount<T>
Source§impl From<ShiftAmount<i32>> for i32
impl From<ShiftAmount<i32>> for i32
Source§fn from(shamt: ShiftAmount<i32>) -> Self
fn from(shamt: ShiftAmount<i32>) -> Self
Converts to this type from the input type.
Source§impl From<ShiftAmount<i64>> for i64
impl From<ShiftAmount<i64>> for i64
Source§fn from(shamt: ShiftAmount<i64>) -> Self
fn from(shamt: ShiftAmount<i64>) -> Self
Converts to this type from the input type.
Source§impl<T: PartialEq> PartialEq for ShiftAmount<T>
impl<T: PartialEq> PartialEq for ShiftAmount<T>
impl<T: Copy> Copy for ShiftAmount<T>
impl<T: Eq> Eq for ShiftAmount<T>
impl<T> StructuralPartialEq for ShiftAmount<T>
Auto Trait Implementations§
impl<T> Freeze for ShiftAmount<T>
impl<T> RefUnwindSafe for ShiftAmount<T>
impl<T> Send for ShiftAmount<T>
impl<T> Sync for ShiftAmount<T>
impl<T> Unpin for ShiftAmount<T>
impl<T> UnwindSafe for ShiftAmount<T>
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.