Struct snarkos_storage::OperatorState
source · [−]pub struct OperatorState<N: Network> { /* private fields */ }
Implementations
sourceimpl<N: Network> OperatorState<N>
impl<N: Network> OperatorState<N>
sourcepub fn open_writer<S: Storage, P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open_writer<S: Storage, P: AsRef<Path>>(path: P) -> Result<Self>
Opens a new writable instance of OperatorState
from the given storage path.
Returns all the shares in storage.
sourcepub fn to_coinbase_records(&self) -> Vec<(u32, Record<N>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn to_coinbase_records(&self) -> Vec<(u32, Record<N>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all coinbase records in storage.
Returns the shares for a specific block, given the block height and coinbase record.
Returns the shares for a specific prover, given the prover address.
Increments the share count by one for a given block height, coinbase record and prover address.
Removes the shares for a given block height and coinbase record in storage.
Trait Implementations
Auto Trait Implementations
impl<N> RefUnwindSafe for OperatorState<N> where
N: RefUnwindSafe,
<N as Network>::ProgramAffineCurve: RefUnwindSafe,
<N as Network>::ProgramID: RefUnwindSafe,
<N as Network>::RecordCiphertext: RefUnwindSafe,
<N as Network>::RecordViewKey: RefUnwindSafe,
impl<N> Send for OperatorState<N>
impl<N> Sync for OperatorState<N>
impl<N> Unpin for OperatorState<N> where
N: Unpin,
<N as Network>::ProgramAffineCurve: Unpin,
<N as Network>::ProgramID: Unpin,
<N as Network>::RecordCiphertext: Unpin,
<N as Network>::RecordViewKey: Unpin,
impl<N> UnwindSafe for OperatorState<N> where
N: UnwindSafe,
<N as Network>::ProgramAffineCurve: UnwindSafe,
<N as Network>::ProgramID: UnwindSafe,
<N as Network>::RecordCiphertext: UnwindSafe,
<N as Network>::RecordViewKey: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more