Struct Gpr
pub struct Gpr(/* private fields */);
Expand description
A newtype wrapper around Reg
.
Implementations§
§impl Gpr
impl Gpr
pub fn new(reg: Reg) -> Option<Gpr>
pub fn new(reg: Reg) -> Option<Gpr>
Create this newtype from the given register, or return None
if the register
is not a valid instance of this newtype.
pub fn unwrap_new(reg: Reg) -> Gpr
pub fn unwrap_new(reg: Reg) -> Gpr
Like Self::new(r).unwrap()
but with a better panic message on
failure.
pub fn to_reg(self) -> Reg
pub fn to_reg(self) -> Reg
Get this newtype’s underlying Reg
.
Trait Implementations§
§impl AsMut<Reg> for Gpr
impl AsMut<Reg> for Gpr
If you know what you’re doing, you can explicitly mutably borrow the
underlying Reg
. Don’t make it point to the wrong type of register
please.
§impl Ord for Gpr
impl Ord for Gpr
§impl PartialOrd for Gpr
impl PartialOrd for Gpr
impl Copy for Gpr
impl Eq for Gpr
impl StructuralPartialEq for Gpr
Auto Trait Implementations§
impl Freeze for Gpr
impl RefUnwindSafe for Gpr
impl Send for Gpr
impl Sync for Gpr
impl Unpin for Gpr
impl UnwindSafe for Gpr
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
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.