pub struct CrankMarker {
pub handler_name: &'static str,
pub seed_hints: &'static [(&'static str, &'static [&'static [u8]])],
}Expand description
Compile-time descriptor for a crank handler.
seed_hints is a slice of (account_field_name, seed_bytes_list)
tuples. Each entry says: “the account field named X on this
crank’s context can be derived from these seeds under the
program’s id”. The crank runner calls find_program_address
with the seeds and fills the account slot automatically.
Fields§
§handler_name: &'static strThe handler function name, same as stringify!(fn_name).
seed_hints: &'static [(&'static str, &'static [&'static [u8]])]Per-account seed hints. Each tuple is
(field_name, &[seed_0, seed_1, ...]).
Implementations§
Source§impl CrankMarker
impl CrankMarker
Sourcepub const fn seed_count(&self) -> usize
pub const fn seed_count(&self) -> usize
Number of declared seed hints.
Trait Implementations§
Source§impl Clone for CrankMarker
impl Clone for CrankMarker
Source§fn clone(&self) -> CrankMarker
fn clone(&self) -> CrankMarker
Returns a duplicate 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 Debug for CrankMarker
impl Debug for CrankMarker
impl Copy for CrankMarker
Auto Trait Implementations§
impl Freeze for CrankMarker
impl RefUnwindSafe for CrankMarker
impl Send for CrankMarker
impl Sync for CrankMarker
impl Unpin for CrankMarker
impl UnsafeUnpin for CrankMarker
impl UnwindSafe for CrankMarker
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