Struct jormungandr::context::Context
source · pub struct Context {
full: Option<FullContext>,
rest_server_stopper: Option<ServerStopper>,
node_state: NodeState,
span: Option<Span>,
diagnostic: Option<Diagnostic>,
blockchain: Option<Blockchain>,
blockchain_tip: Option<Tip>,
bootstrap_stopper: Option<CancellationToken>,
}
Fields§
§full: Option<FullContext>
§rest_server_stopper: Option<ServerStopper>
§node_state: NodeState
§span: Option<Span>
§diagnostic: Option<Diagnostic>
§blockchain: Option<Blockchain>
§blockchain_tip: Option<Tip>
§bootstrap_stopper: Option<CancellationToken>
Implementations§
source§impl Context
impl Context
pub fn new() -> Self
pub fn set_full(&mut self, full_context: FullContext)
pub fn try_full(&self) -> Result<&FullContext, Error>
pub fn set_rest_server_stopper(&mut self, server_stopper: ServerStopper)
pub fn rest_server_stopper(&self) -> Result<&ServerStopper, Error>
pub fn set_node_state(&mut self, node_state: NodeState)
pub fn node_state(&self) -> &NodeState
pub fn set_span(&mut self, span: Span)
pub fn span(&self) -> Result<&Span, Error>
pub fn set_diagnostic_data(&mut self, diagnostic: Diagnostic)
pub fn get_diagnostic_data(&self) -> Result<&Diagnostic, Error>
pub fn set_blockchain(&mut self, blockchain: Blockchain)
pub fn blockchain(&self) -> Result<&Blockchain, Error>
pub fn set_blockchain_tip(&mut self, blockchain_tip: Tip)
pub fn blockchain_tip(&self) -> Result<&Tip, Error>
pub fn set_bootstrap_stopper(&mut self, bootstrap_stopper: CancellationToken)
pub fn remove_bootstrap_stopper(&mut self)
pub fn stop_bootstrap(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
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