#[repr(C)]pub struct ConcurrentMerkleTreeHeader {
pub account_type: CompressionAccountType,
pub header: ConcurrentMerkleTreeHeaderData,
}Expand description
Initialization parameters for an SPL ConcurrentMerkleTree.
Only the following permutations are valid:
| max_depth | max_buffer_size |
|---|---|
| 14 | (64, 256, 1024, 2048) |
| 20 | (64, 256, 1024, 2048) |
| 24 | (64, 256, 512, 1024, 2048) |
| 26 | (64, 256, 512, 1024, 2048) |
| 30 | (512, 1024, 2048) |
Fields§
§account_type: CompressionAccountTypeAccount type
header: ConcurrentMerkleTreeHeaderDataVersioned header
Implementations§
Source§impl ConcurrentMerkleTreeHeader
impl ConcurrentMerkleTreeHeader
pub fn initialize( &mut self, max_depth: u32, max_buffer_size: u32, authority: &Pubkey, creation_slot: u64, )
pub fn get_max_depth(&self) -> u32
pub fn get_max_buffer_size(&self) -> u32
pub fn get_creation_slot(&self) -> u64
pub fn assert_valid(&self) -> Result<()>
pub fn assert_valid_leaf_index(&self, leaf_index: u32) -> Result<()>
Trait Implementations§
Source§impl BorshDeserialize for ConcurrentMerkleTreeHeader
impl BorshDeserialize for ConcurrentMerkleTreeHeader
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,
Auto Trait Implementations§
impl Freeze for ConcurrentMerkleTreeHeader
impl RefUnwindSafe for ConcurrentMerkleTreeHeader
impl Send for ConcurrentMerkleTreeHeader
impl Sync for ConcurrentMerkleTreeHeader
impl Unpin for ConcurrentMerkleTreeHeader
impl UnsafeUnpin for ConcurrentMerkleTreeHeader
impl UnwindSafe for ConcurrentMerkleTreeHeader
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