pub struct ProofMetadata { /* private fields */ }Expand description
Metadata attached to a proof node.
Implementations§
Source§impl ProofMetadata
impl ProofMetadata
Sourcepub fn with_priority(self, priority: Priority) -> Self
pub fn with_priority(self, priority: Priority) -> Self
Set priority level.
Sourcepub fn with_difficulty(self, difficulty: Difficulty) -> Self
pub fn with_difficulty(self, difficulty: Difficulty) -> Self
Set difficulty estimate.
Sourcepub fn with_strategy(self, strategy: Strategy) -> Self
pub fn with_strategy(self, strategy: Strategy) -> Self
Add a strategy hint.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set description.
Sourcepub fn with_attribute(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_attribute( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add a custom attribute.
Sourcepub fn difficulty(&self) -> Difficulty
pub fn difficulty(&self) -> Difficulty
Get difficulty estimate.
Sourcepub fn strategies(&self) -> &[Strategy]
pub fn strategies(&self) -> &[Strategy]
Get strategy hints.
Get tags.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get description.
Sourcepub fn get_attribute(&self, key: &str) -> Option<&str>
pub fn get_attribute(&self, key: &str) -> Option<&str>
Get custom attribute.
Sourcepub fn attributes(&self) -> &FxHashMap<String, String>
pub fn attributes(&self) -> &FxHashMap<String, String>
Get all custom attributes.
Sourcepub fn has_strategy(&self, strategy: Strategy) -> bool
pub fn has_strategy(&self, strategy: Strategy) -> bool
Check if has strategy.
Sourcepub fn set_priority(&mut self, priority: Priority)
pub fn set_priority(&mut self, priority: Priority)
Set priority (mutable).
Sourcepub fn set_difficulty(&mut self, difficulty: Difficulty)
pub fn set_difficulty(&mut self, difficulty: Difficulty)
Set difficulty (mutable).
Sourcepub fn add_strategy(&mut self, strategy: Strategy)
pub fn add_strategy(&mut self, strategy: Strategy)
Add strategy (mutable).
Sourcepub fn set_attribute(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn set_attribute( &mut self, key: impl Into<String>, value: impl Into<String>, )
Set attribute (mutable).
Sourcepub fn remove_tag(&mut self, tag: &str) -> bool
pub fn remove_tag(&mut self, tag: &str) -> bool
Remove tag.
Trait Implementations§
Source§impl Clone for ProofMetadata
impl Clone for ProofMetadata
Source§fn clone(&self) -> ProofMetadata
fn clone(&self) -> ProofMetadata
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 ProofMetadata
impl Debug for ProofMetadata
Source§impl Default for ProofMetadata
impl Default for ProofMetadata
Source§fn default() -> ProofMetadata
fn default() -> ProofMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProofMetadata
impl RefUnwindSafe for ProofMetadata
impl Send for ProofMetadata
impl Sync for ProofMetadata
impl Unpin for ProofMetadata
impl UnsafeUnpin for ProofMetadata
impl UnwindSafe for ProofMetadata
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