pub struct Address(/* private fields */);Expand description
A Solana address (public key): 32 bytes, transparent layout.
PartialEq/Eq are implemented manually (see below) so every
Address == Address – and every owner / program-id check that
funnels through address_eq – compiles to a 4 x u64 word
compare instead of a bytewise loop. PartialOrd/Ord stay
derived: word-equality and byte-equality decide the same pairs
equal, so the derived ordering remains consistent with the manual
equality.
Implementations§
Trait Implementations§
impl Eq for Address
Source§impl Ord for Address
impl Ord for Address
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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