Skip to main content
The Context represents the main context for Tashi Vertex and must be initialized before using most other functions. This opaque handle encapsulates internal state and configuration required for operations.

Constructor

new

Initialize a new context for Tashi Vertex.
pub fn new() -> crate::Result<Self>

Returns

return
Result<Context>
Returns a new Context instance on success, or an Error if initialization fails.

Example

use tashi_vertex::Context;

let context = Context::new()?;
The context must be initialized before creating sockets or starting the engine. All Tashi Vertex operations require a valid context.
  • Engine - Requires a Context to start the consensus engine
  • Socket - Requires a Context to bind to an address
  • Error - Possible error types returned by Context::new()

Build docs developers (and LLMs) love