pub struct TreeInfo {
pub cpi_context: Option<Pubkey>,
pub next_tree_info: Option<NextTreeInfo>,
pub queue: Pubkey,
pub tree: Pubkey,
pub tree_type: TreeType,
}Fields§
§cpi_context: Option<Pubkey>§next_tree_info: Option<NextTreeInfo>§queue: Pubkey§tree: Pubkey§tree_type: TreeTypeImplementations§
Source§impl TreeInfo
impl TreeInfo
Sourcepub fn pack_output_tree_index(
&self,
packed_accounts: &mut PackedAccounts,
) -> Result<u8, IndexerError>
pub fn pack_output_tree_index( &self, packed_accounts: &mut PackedAccounts, ) -> Result<u8, IndexerError>
Get the index of the output tree in the packed accounts. For StateV1, it returns the index of the tree account. For StateV2, it returns the index of the queue account. (For V2 trees new state is inserted into the output queue. The forester updates the tree from the queue asynchronously.)
pub fn get_output_pubkey(&self) -> Result<Pubkey, IndexerError>
pub fn from_api_model(value: &MerkleContextV2) -> Result<Self, IndexerError>
pub fn to_light_merkle_context( &self, leaf_index: u32, prove_by_index: bool, ) -> MerkleContext
Trait Implementations§
Source§impl Into<TreeInfo> for StateMerkleTreeAccounts
impl Into<TreeInfo> for StateMerkleTreeAccounts
impl Copy for TreeInfo
impl StructuralPartialEq for TreeInfo
Auto Trait Implementations§
impl Freeze for TreeInfo
impl RefUnwindSafe for TreeInfo
impl Send for TreeInfo
impl Sync for TreeInfo
impl Unpin for TreeInfo
impl UnwindSafe for TreeInfo
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more