pub trait Decidable {
// Required methods
fn id(&self) -> Id;
fn status(&self) -> Status;
fn accept(&mut self) -> Result<()>;
fn reject(&mut self) -> Result<()>;
}Expand description
Represents an element that can be decided. Decidable objects are transactions, blocks, or vertices. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/snow/choices#Decidable
Required Methods§
Sourcefn accept(&mut self) -> Result<()>
fn accept(&mut self) -> Result<()>
Accepts this element. TODO: use https://docs.rs/tokio-context/latest/tokio_context?
Sourcefn reject(&mut self) -> Result<()>
fn reject(&mut self) -> Result<()>
Rejects this element. TODO: use https://docs.rs/tokio-context/latest/tokio_context?
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".