pub struct RaftContext<T>where
T: TypeConfig,{
pub node_id: u32,
pub storage: RaftStorageHandles<T>,
pub transport: Arc<TROF<T>>,
pub membership: Arc<MOF<T>>,
pub handlers: RaftCoreHandlers<T>,
pub node_config: Arc<RaftNodeConfig>,
}Fields§
§node_id: u32§storage: RaftStorageHandles<T>§transport: Arc<TROF<T>>§membership: Arc<MOF<T>>§handlers: RaftCoreHandlers<T>§node_config: Arc<RaftNodeConfig>Implementations§
Source§impl<T> RaftContext<T>where
T: TypeConfig,
impl<T> RaftContext<T>where
T: TypeConfig,
pub fn raft_log(&self) -> &Arc<ROF<T>>
pub fn state_machine(&self) -> &SMOF<T>
pub fn transport(&self) -> &Arc<TROF<T>>
pub fn replication_handler(&self) -> &REPOF<T>
pub fn election_handler(&self) -> &EOF<T>
pub fn state_machine_handler(&self) -> &Arc<SMHOF<T>>
pub fn node_config(&self) -> Arc<RaftNodeConfig>
pub fn membership(&self) -> Arc<MOF<T>>
pub fn purge_executor(&self) -> Arc<PE<T>>
pub fn membership_ref(&self) -> &Arc<MOF<T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RaftContext<T>
impl<T> RefUnwindSafe for RaftContext<T>where
<T as TypeConfig>::E: RefUnwindSafe,
<T as TypeConfig>::REP: RefUnwindSafe,
<T as TypeConfig>::TR: RefUnwindSafe,
<T as TypeConfig>::M: RefUnwindSafe,
<T as TypeConfig>::R: RefUnwindSafe,
<T as TypeConfig>::SM: RefUnwindSafe,
<T as TypeConfig>::SMH: RefUnwindSafe,
<T as TypeConfig>::PE: RefUnwindSafe,
impl<T> Send for RaftContext<T>
impl<T> Sync for RaftContext<T>
impl<T> Unpin for RaftContext<T>
impl<T> UnwindSafe for RaftContext<T>where
<T as TypeConfig>::TR: RefUnwindSafe,
<T as TypeConfig>::M: RefUnwindSafe,
<T as TypeConfig>::E: UnwindSafe,
<T as TypeConfig>::REP: UnwindSafe,
<T as TypeConfig>::R: RefUnwindSafe,
<T as TypeConfig>::SM: RefUnwindSafe,
<T as TypeConfig>::SMH: RefUnwindSafe,
<T as TypeConfig>::PE: 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
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