pub struct Block<N>where
N: Network,{ /* private fields */ }Implementations§
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub const NUM_GENESIS_TRANSACTIONS: usize = 4usize
pub const NUM_GENESIS_TRANSACTIONS: usize = 4usize
Specifies the number of genesis transactions.
Sourcepub fn is_genesis(&self) -> Result<bool, Error>
pub fn is_genesis(&self) -> Result<bool, Error>
Returns true if the block is a genesis block.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn verify(
&self,
previous_block: &Block<N>,
current_state_root: <N as Network>::StateRoot,
previous_committee_lookback: &Committee<N>,
current_committee_lookback: &Committee<N>,
current_puzzle: &Puzzle<N>,
current_epoch_hash: <N as Network>::BlockHash,
current_timestamp: i64,
ratified_finalize_operations: Vec<FinalizeOperation<N>>,
) -> Result<(Vec<SolutionID<N>>, Vec<<N as Network>::TransactionID>), Error>
pub fn verify( &self, previous_block: &Block<N>, current_state_root: <N as Network>::StateRoot, previous_committee_lookback: &Committee<N>, current_committee_lookback: &Committee<N>, current_puzzle: &Puzzle<N>, current_epoch_hash: <N as Network>::BlockHash, current_timestamp: i64, ratified_finalize_operations: Vec<FinalizeOperation<N>>, ) -> Result<(Vec<SolutionID<N>>, Vec<<N as Network>::TransactionID>), Error>
Ensures the block is correct.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn new_beacon<R>(
private_key: &PrivateKey<N>,
previous_hash: <N as Network>::BlockHash,
header: Header<N>,
ratifications: Ratifications<N>,
solutions: Solutions<N>,
aborted_solution_ids: Vec<SolutionID<N>>,
transactions: Transactions<N>,
aborted_transaction_ids: Vec<<N as Network>::TransactionID>,
rng: &mut R,
) -> Result<Block<N>, Error>
pub fn new_beacon<R>( private_key: &PrivateKey<N>, previous_hash: <N as Network>::BlockHash, header: Header<N>, ratifications: Ratifications<N>, solutions: Solutions<N>, aborted_solution_ids: Vec<SolutionID<N>>, transactions: Transactions<N>, aborted_transaction_ids: Vec<<N as Network>::TransactionID>, rng: &mut R, ) -> Result<Block<N>, Error>
Initializes a new beacon block from the given previous block hash, block header, ratifications, solutions, transactions, and aborted transaction IDs.
Sourcepub fn new_quorum(
previous_hash: <N as Network>::BlockHash,
header: Header<N>,
subdag: Subdag<N>,
ratifications: Ratifications<N>,
solutions: Solutions<N>,
aborted_solution_ids: Vec<SolutionID<N>>,
transactions: Transactions<N>,
aborted_transaction_ids: Vec<<N as Network>::TransactionID>,
) -> Result<Block<N>, Error>
pub fn new_quorum( previous_hash: <N as Network>::BlockHash, header: Header<N>, subdag: Subdag<N>, ratifications: Ratifications<N>, solutions: Solutions<N>, aborted_solution_ids: Vec<SolutionID<N>>, transactions: Transactions<N>, aborted_transaction_ids: Vec<<N as Network>::TransactionID>, ) -> Result<Block<N>, Error>
Initializes a new quorum block from the given previous block hash, block header, subdag, ratifications, solutions, transactions, and aborted transaction IDs.
Sourcepub fn from(
previous_hash: <N as Network>::BlockHash,
header: Header<N>,
authority: Authority<N>,
ratifications: Ratifications<N>,
solutions: Solutions<N>,
aborted_solution_ids: Vec<SolutionID<N>>,
transactions: Transactions<N>,
aborted_transaction_ids: Vec<<N as Network>::TransactionID>,
) -> Result<Block<N>, Error>
pub fn from( previous_hash: <N as Network>::BlockHash, header: Header<N>, authority: Authority<N>, ratifications: Ratifications<N>, solutions: Solutions<N>, aborted_solution_ids: Vec<SolutionID<N>>, transactions: Transactions<N>, aborted_transaction_ids: Vec<<N as Network>::TransactionID>, ) -> Result<Block<N>, Error>
Initializes a new block from the given previous block hash, block header, authority, ratifications, solutions, aborted solution IDs, transactions, and aborted transaction IDs.
Sourcepub fn from_unchecked(
block_hash: <N as Network>::BlockHash,
previous_hash: <N as Network>::BlockHash,
header: Header<N>,
authority: Authority<N>,
ratifications: Ratifications<N>,
solutions: Solutions<N>,
aborted_solution_ids: Vec<SolutionID<N>>,
transactions: Transactions<N>,
aborted_transaction_ids: Vec<<N as Network>::TransactionID>,
) -> Result<Block<N>, Error>
pub fn from_unchecked( block_hash: <N as Network>::BlockHash, previous_hash: <N as Network>::BlockHash, header: Header<N>, authority: Authority<N>, ratifications: Ratifications<N>, solutions: Solutions<N>, aborted_solution_ids: Vec<SolutionID<N>>, transactions: Transactions<N>, aborted_transaction_ids: Vec<<N as Network>::TransactionID>, ) -> Result<Block<N>, Error>
Initializes a new block from the given block hash, previous block hash, block header, authority, ratifications, solutions, transactions, and aborted transaction IDs.
This function does not perform any checks on the given data, and should only be called if the inputs are trusted.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub const fn previous_hash(&self) -> <N as Network>::BlockHash
pub const fn previous_hash(&self) -> <N as Network>::BlockHash
Returns the previous block hash.
Returns the authority.
Sourcepub const fn ratifications(&self) -> &Ratifications<N>
pub const fn ratifications(&self) -> &Ratifications<N>
Returns the ratifications in this block.
Sourcepub const fn aborted_solution_ids(&self) -> &Vec<SolutionID<N>>
pub const fn aborted_solution_ids(&self) -> &Vec<SolutionID<N>>
Returns the aborted solution IDs in this block.
Sourcepub const fn transactions(&self) -> &Transactions<N>
pub const fn transactions(&self) -> &Transactions<N>
Returns the transactions in this block.
Sourcepub const fn aborted_transaction_ids(
&self,
) -> &Vec<<N as Network>::TransactionID>
pub const fn aborted_transaction_ids( &self, ) -> &Vec<<N as Network>::TransactionID>
Returns the aborted transaction IDs in this block.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub const fn previous_state_root(&self) -> <N as Network>::StateRoot
pub const fn previous_state_root(&self) -> <N as Network>::StateRoot
Returns the previous state root from the block header.
Sourcepub const fn transactions_root(&self) -> Field<N>
pub const fn transactions_root(&self) -> Field<N>
Returns the transactions root in the block header.
Sourcepub const fn finalize_root(&self) -> Field<N>
pub const fn finalize_root(&self) -> Field<N>
Returns the finalize root in the block header.
Sourcepub const fn ratifications_root(&self) -> Field<N>
pub const fn ratifications_root(&self) -> Field<N>
Returns the ratifications root in the block header.
Sourcepub const fn solutions_root(&self) -> Field<N>
pub const fn solutions_root(&self) -> Field<N>
Returns the solutions root in the block header.
Sourcepub const fn epoch_number(&self) -> u32
pub const fn epoch_number(&self) -> u32
Returns the epoch number of this block.
Sourcepub const fn cumulative_weight(&self) -> u128
pub const fn cumulative_weight(&self) -> u128
Returns the cumulative weight for this block.
Sourcepub const fn cumulative_proof_target(&self) -> u128
pub const fn cumulative_proof_target(&self) -> u128
Returns the cumulative proof target for this block.
Sourcepub const fn coinbase_target(&self) -> u64
pub const fn coinbase_target(&self) -> u64
Returns the coinbase target for this block.
Sourcepub const fn proof_target(&self) -> u64
pub const fn proof_target(&self) -> u64
Returns the proof target for this block.
Sourcepub const fn last_coinbase_target(&self) -> u64
pub const fn last_coinbase_target(&self) -> u64
Returns the coinbase target of the last coinbase.
Sourcepub const fn last_coinbase_timestamp(&self) -> i64
pub const fn last_coinbase_timestamp(&self) -> i64
Returns the block timestamp of the last coinbase.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn contains_transition(
&self,
transition_id: &<N as Network>::TransitionID,
) -> bool
pub fn contains_transition( &self, transition_id: &<N as Network>::TransitionID, ) -> bool
Returns true if the block contains the given transition ID.
Sourcepub fn contains_serial_number(&self, serial_number: &Field<N>) -> bool
pub fn contains_serial_number(&self, serial_number: &Field<N>) -> bool
Returns true if the block contains the given serial number.
Sourcepub fn contains_commitment(&self, commitment: &Field<N>) -> bool
pub fn contains_commitment(&self, commitment: &Field<N>) -> bool
Returns true if the block contains the given commitment.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn get_solution(&self, solution_id: &SolutionID<N>) -> Option<&Solution<N>>
pub fn get_solution(&self, solution_id: &SolutionID<N>) -> Option<&Solution<N>>
Returns the solution with the given solution ID, if it exists.
Sourcepub fn get_transaction(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Option<&Transaction<N>>
pub fn get_transaction( &self, transaction_id: &<N as Network>::TransactionID, ) -> Option<&Transaction<N>>
Returns the transaction with the given transaction ID, if it exists.
Sourcepub fn get_confirmed_transaction(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Option<&ConfirmedTransaction<N>>
pub fn get_confirmed_transaction( &self, transaction_id: &<N as Network>::TransactionID, ) -> Option<&ConfirmedTransaction<N>>
Returns the confirmed transaction with the given transaction ID, if it exists.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn find_transaction_for_transition_id(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Option<&Transaction<N>>
pub fn find_transaction_for_transition_id( &self, transition_id: &<N as Network>::TransitionID, ) -> Option<&Transaction<N>>
Returns the transaction with the given transition ID, if it exists.
Sourcepub fn find_transaction_for_serial_number(
&self,
serial_number: &Field<N>,
) -> Option<&Transaction<N>>
pub fn find_transaction_for_serial_number( &self, serial_number: &Field<N>, ) -> Option<&Transaction<N>>
Returns the transaction with the given serial number, if it exists.
Sourcepub fn find_transaction_for_commitment(
&self,
commitment: &Field<N>,
) -> Option<&Transaction<N>>
pub fn find_transaction_for_commitment( &self, commitment: &Field<N>, ) -> Option<&Transaction<N>>
Returns the transaction with the given commitment, if it exists.
Sourcepub fn find_transition(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Option<&Transition<N>>
pub fn find_transition( &self, transition_id: &<N as Network>::TransitionID, ) -> Option<&Transition<N>>
Returns the transition with the corresponding transition ID, if it exists.
Sourcepub fn find_transition_for_serial_number(
&self,
serial_number: &Field<N>,
) -> Option<&Transition<N>>
pub fn find_transition_for_serial_number( &self, serial_number: &Field<N>, ) -> Option<&Transition<N>>
Returns the transition for the given serial number, if it exists.
Sourcepub fn find_transition_for_commitment(
&self,
commitment: &Field<N>,
) -> Option<&Transition<N>>
pub fn find_transition_for_commitment( &self, commitment: &Field<N>, ) -> Option<&Transition<N>>
Returns the transition for the given commitment, if it exists.
Sourcepub fn find_record(
&self,
commitment: &Field<N>,
) -> Option<&Record<N, Ciphertext<N>>>
pub fn find_record( &self, commitment: &Field<N>, ) -> Option<&Record<N, Ciphertext<N>>>
Returns the record with the corresponding commitment, if it exists.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn solution_ids(&self) -> Option<impl Iterator<Item = &SolutionID<N>>>
pub fn solution_ids(&self) -> Option<impl Iterator<Item = &SolutionID<N>>>
Returns an iterator over the solution IDs in this block.
Sourcepub fn transaction_ids(
&self,
) -> impl Iterator<Item = &<N as Network>::TransactionID>
pub fn transaction_ids( &self, ) -> impl Iterator<Item = &<N as Network>::TransactionID>
Returns an iterator over the transaction IDs, for all transactions in self.
Sourcepub fn deployments(&self) -> impl Iterator<Item = &ConfirmedTransaction<N>>
pub fn deployments(&self) -> impl Iterator<Item = &ConfirmedTransaction<N>>
Returns an iterator over all transactions in self that are accepted deploy transactions.
Sourcepub fn executions(&self) -> impl Iterator<Item = &ConfirmedTransaction<N>>
pub fn executions(&self) -> impl Iterator<Item = &ConfirmedTransaction<N>>
Returns an iterator over all transactions in self that are accepted execute transactions.
Sourcepub fn transitions(&self) -> impl Iterator<Item = &Transition<N>>
pub fn transitions(&self) -> impl Iterator<Item = &Transition<N>>
Returns an iterator over all transitions.
Sourcepub fn transition_ids(
&self,
) -> impl Iterator<Item = &<N as Network>::TransitionID>
pub fn transition_ids( &self, ) -> impl Iterator<Item = &<N as Network>::TransitionID>
Returns an iterator over the transition IDs, for all transitions.
Sourcepub fn transition_public_keys(&self) -> impl Iterator<Item = &Group<N>>
pub fn transition_public_keys(&self) -> impl Iterator<Item = &Group<N>>
Returns an iterator over the transition public keys, for all transactions.
Sourcepub fn transition_commitments(&self) -> impl Iterator<Item = &Field<N>>
pub fn transition_commitments(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the transition commitments, for all transactions.
Returns an iterator over the tags, for all transition inputs that are records.
Sourcepub fn input_ids(&self) -> impl Iterator<Item = &Field<N>>
pub fn input_ids(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the input IDs, for all transition inputs that are records.
Sourcepub fn serial_numbers(&self) -> impl Iterator<Item = &Field<N>>
pub fn serial_numbers(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the serial numbers, for all transition inputs that are records.
Sourcepub fn output_ids(&self) -> impl Iterator<Item = &Field<N>>
pub fn output_ids(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the output IDs, for all transition inputs that are records.
Sourcepub fn commitments(&self) -> impl Iterator<Item = &Field<N>>
pub fn commitments(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the commitments, for all transition outputs that are records.
Sourcepub fn records(
&self,
) -> impl Iterator<Item = (&Field<N>, &Record<N, Ciphertext<N>>)>
pub fn records( &self, ) -> impl Iterator<Item = (&Field<N>, &Record<N, Ciphertext<N>>)>
Returns an iterator over the records, for all transition outputs that are records.
Source§impl<N> Block<N>where
N: Network,
impl<N> Block<N>where
N: Network,
Sourcepub fn into_transaction_ids(
self,
) -> impl Iterator<Item = <N as Network>::TransactionID>
pub fn into_transaction_ids( self, ) -> impl Iterator<Item = <N as Network>::TransactionID>
Returns a consuming iterator over the transaction IDs, for all transactions in self.
Sourcepub fn into_deployments(self) -> impl Iterator<Item = ConfirmedTransaction<N>>
pub fn into_deployments(self) -> impl Iterator<Item = ConfirmedTransaction<N>>
Returns a consuming iterator over all transactions in self that are accepted deploy transactions.
Sourcepub fn into_executions(self) -> impl Iterator<Item = ConfirmedTransaction<N>>
pub fn into_executions(self) -> impl Iterator<Item = ConfirmedTransaction<N>>
Returns a consuming iterator over all transactions in self that are accepted execute transactions.
Sourcepub fn into_transitions(self) -> impl Iterator<Item = Transition<N>>
pub fn into_transitions(self) -> impl Iterator<Item = Transition<N>>
Returns a consuming iterator over all transitions.
Sourcepub fn into_transition_ids(
self,
) -> impl Iterator<Item = <N as Network>::TransitionID>
pub fn into_transition_ids( self, ) -> impl Iterator<Item = <N as Network>::TransitionID>
Returns a consuming iterator over the transition IDs, for all transitions.
Sourcepub fn into_transition_public_keys(self) -> impl Iterator<Item = Group<N>>
pub fn into_transition_public_keys(self) -> impl Iterator<Item = Group<N>>
Returns a consuming iterator over the transition public keys, for all transactions.
Returns a consuming iterator over the tags, for all transition inputs that are records.
Sourcepub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
pub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the serial numbers, for all transition inputs that are records.
Sourcepub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
pub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the commitments, for all transition outputs that are records.
Sourcepub fn into_records(
self,
) -> impl Iterator<Item = (Field<N>, Record<N, Ciphertext<N>>)>
pub fn into_records( self, ) -> impl Iterator<Item = (Field<N>, Record<N, Ciphertext<N>>)>
Returns a consuming iterator over the records, for all transition outputs that are records.
Sourcepub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
pub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
Returns a consuming iterator over the nonces, for all transition outputs that are records.
Trait Implementations§
Source§impl<'de, N> Deserialize<'de> for Block<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Block<N>where
N: Network,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Block<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Block<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the block from a JSON-string or buffer.
Source§impl<N> FromBytes for Block<N>where
N: Network,
impl<N> FromBytes for Block<N>where
N: Network,
Source§fn read_le_with_unchecked<R>(
reader: R,
unchecked: bool,
) -> Result<Block<N>, Error>where
R: Read,
fn read_le_with_unchecked<R>(
reader: R,
unchecked: bool,
) -> Result<Block<N>, Error>where
R: Read,
Read the block either with or without checking the data.
Source§fn read_le<R>(reader: R) -> Result<Block<N>, Error>where
R: Read,
fn read_le<R>(reader: R) -> Result<Block<N>, Error>where
R: Read,
Reads the block from the buffer.
Source§fn read_le_unchecked<R>(reader: R) -> Result<Block<N>, Error>where
R: Read,
fn read_le_unchecked<R>(reader: R) -> Result<Block<N>, Error>where
R: Read,
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N> Serialize for Block<N>where
N: Network,
impl<N> Serialize for Block<N>where
N: Network,
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the block to a JSON-string or buffer.
impl<N> Eq for Block<N>
impl<N> StructuralPartialEq for Block<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for Block<N>where
<N as Network>::BlockHash: Freeze,
<N as Network>::StateRoot: Freeze,
<N as Environment>::Field: Freeze,
<N as Environment>::Scalar: Freeze,
<N as Environment>::Projective: Freeze,
impl<N> RefUnwindSafe for Block<N>where
<N as Network>::BlockHash: RefUnwindSafe,
<N as Network>::StateRoot: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
N: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Network>::RatificationID: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Network>::TransmissionChecksum: RefUnwindSafe,
impl<N> Send for Block<N>
impl<N> Sync for Block<N>
impl<N> Unpin for Block<N>where
<N as Network>::BlockHash: Unpin,
<N as Network>::StateRoot: Unpin,
<N as Environment>::Field: Unpin,
N: Unpin,
<N as Environment>::Scalar: Unpin,
<N as Network>::TransactionID: Unpin,
<N as Environment>::Projective: Unpin,
<N as Network>::RatificationID: Unpin,
<N as Network>::TransitionID: Unpin,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin,
impl<N> UnwindSafe for Block<N>where
<N as Network>::BlockHash: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Environment>::Field: UnwindSafe + RefUnwindSafe,
N: UnwindSafe + RefUnwindSafe,
<N as Environment>::Scalar: UnwindSafe + RefUnwindSafe,
<N as Network>::TransactionID: UnwindSafe + RefUnwindSafe,
<N as Environment>::Projective: UnwindSafe + RefUnwindSafe,
<N as Network>::RatificationID: UnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe,
<N as Network>::TransmissionChecksum: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
fn take_from_value<D>(
value: &mut Value,
field: &str,
) -> Result<T, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.