pub struct State {
pub ctx: Option<Context<ValidatorStateClient>>,
pub version: Version,
pub genesis: Genesis,
pub state: Option<State>,
pub preferred: Id,
pub to_engine: Option<Sender<Message>>,
pub bootstrapped: bool,
}
Expand description
Represents VM-specific states.
Defined in a separate struct, for interior mutability in Vm
.
To be protected with Arc
and RwLock
.
Fields§
§ctx: Option<Context<ValidatorStateClient>>
§version: Version
§genesis: Genesis
§state: Option<State>
Represents persistent Vm state.
preferred: Id
Currently preferred block Id.
to_engine: Option<Sender<Message>>
Channel to send messages to the snowman consensus engine.
bootstrapped: bool
Set “true” to indicate that the Vm has finished bootstrapping for the chain.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for State
impl !RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request