pub struct ExecutableGraphRegistryBuilder { /* private fields */ }Expand description
Startup-only builder for a closed executable deployment snapshot.
Implementations§
Source§impl ExecutableGraphRegistryBuilder
impl ExecutableGraphRegistryBuilder
Sourcepub const MAX_GRAPHS: usize = 1024
pub const MAX_GRAPHS: usize = 1024
Maximum graph definitions in one process snapshot.
Sourcepub const MAX_REDUCERS: usize = 1024
pub const MAX_REDUCERS: usize = 1024
Maximum reducer revisions in one process snapshot.
Sourcepub const MAX_NODE_EXECUTORS: usize = 65_536
pub const MAX_NODE_EXECUTORS: usize = 65_536
Maximum graph-node implementations in one process snapshot.
Sourcepub fn new(schemas: JsonSchemaRegistry) -> Self
pub fn new(schemas: JsonSchemaRegistry) -> Self
Creates an empty executable binding builder over a frozen schema set.
Sourcepub fn register_graph(
&mut self,
graph: CompiledGraph,
) -> Result<(), ExecutableGraphRegistryError>
pub fn register_graph( &mut self, graph: CompiledGraph, ) -> Result<(), ExecutableGraphRegistryError>
Registers one canonical declarative graph revision.
§Errors
Rejects ceiling exhaustion, an exact duplicate, or reuse of the same owner/name/version identity with different immutable bytes.
Sourcepub fn register_reducer(
&mut self,
reducer: Arc<dyn GraphReducer>,
) -> Result<(), ExecutableGraphRegistryError>
pub fn register_reducer( &mut self, reducer: Arc<dyn GraphReducer>, ) -> Result<(), ExecutableGraphRegistryError>
Registers one exactly referenced pure reducer implementation.
§Errors
Rejects ceiling exhaustion, duplicate references, or identity reuse with another digest.
Sourcepub fn register_node(
&mut self,
executor: Arc<dyn GraphNodeExecutor>,
) -> Result<(), ExecutableGraphRegistryError>
pub fn register_node( &mut self, executor: Arc<dyn GraphNodeExecutor>, ) -> Result<(), ExecutableGraphRegistryError>
Registers one node implementation bound to a whole graph digest.
§Errors
Rejects ceiling exhaustion or a repeated (graph, node) binding.
Sourcepub fn build(
self,
) -> Result<ExecutableGraphRegistry, ExecutableGraphRegistryError>
pub fn build( self, ) -> Result<ExecutableGraphRegistry, ExecutableGraphRegistryError>
Verifies complete graph/schema/reducer/node closure and freezes lookup.
§Errors
Rejects an empty deployment; absent graph schemas, reducers, or nodes; node code not declared by its graph; and orphan executable code that no registered graph can ever resolve.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutableGraphRegistryBuilder
impl !UnwindSafe for ExecutableGraphRegistryBuilder
impl Forget for ExecutableGraphRegistryBuilder
impl Freeze for ExecutableGraphRegistryBuilder
impl Move for ExecutableGraphRegistryBuilder
impl Send for ExecutableGraphRegistryBuilder
impl Sync for ExecutableGraphRegistryBuilder
impl Unpin for ExecutableGraphRegistryBuilder
impl UnsafeUnpin for ExecutableGraphRegistryBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more