pub struct Pubkey(/* private fields */);Expand description
A Solana public key / program id / PDA — 32 bytes, base58-encoded on the wire.
Implementations§
Source§impl Pubkey
impl Pubkey
Sourcepub const MEMO: Self
pub const MEMO: Self
The SPL Memo program v3 (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr).
Bytes captured from @solana/spl-memo MEMO_PROGRAM_ID (2026-07-19).
Sourcepub const SAS: Self
pub const SAS: Self
The Solana Attestation Service program
(22zoJMtdu4tQc2PzL74ZUT7FrwgB1Udec8DdW4yw4BdG).
Bytes captured from @solana/web3.js (2026-07-19).
Sourcepub const fn from_bytes(b: [u8; 32]) -> Self
pub const fn from_bytes(b: [u8; 32]) -> Self
Construct from raw 32 bytes (e.g. a PDA hash output or an account owner).
Trait Implementations§
Source§impl BorshDeserialize for Pubkey
impl BorshDeserialize for Pubkey
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Pubkey
impl BorshSerialize for Pubkey
impl Copy for Pubkey
impl Eq for Pubkey
Source§impl Ord for Pubkey
impl Ord for Pubkey
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
Source§impl PartialOrd for Pubkey
impl PartialOrd for Pubkey
impl StructuralPartialEq for Pubkey
Auto Trait Implementations§
impl Freeze for Pubkey
impl RefUnwindSafe for Pubkey
impl Send for Pubkey
impl Sync for Pubkey
impl Unpin for Pubkey
impl UnsafeUnpin for Pubkey
impl UnwindSafe for Pubkey
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