pub struct DefinitionGraph { /* private fields */ }
Implementations§
Source§impl DefinitionGraph
A graph definition or DefinitionGraph defines a graph of executable nodes connected by edges or ‘triggers’.
The graph is defined in a DSL (domain specific language) that is compiled into a binary formatted File that can be
executed by the prompt-graph-core runtime.
impl DefinitionGraph
A graph definition or DefinitionGraph defines a graph of executable nodes connected by edges or ‘triggers’. The graph is defined in a DSL (domain specific language) that is compiled into a binary formatted File that can be executed by the prompt-graph-core runtime.
Sourcepub fn from_file(file: File) -> Self
pub fn from_file(file: File) -> Self
Sets this graph definition to read from & write to the given File object
Sourcepub fn new(bytes: &[u8]) -> Self
pub fn new(bytes: &[u8]) -> Self
Store the given bytes (representing protobuf graph definition) as a new File object and associate this graph definition with it
Sourcepub fn register_node(&mut self, item: Item)
pub fn register_node(&mut self, item: Item)
Push a given node (defined as Item type) to the internal graph definition
Sourcepub fn register_node_bytes(&mut self, item: &[u8])
pub fn register_node_bytes(&mut self, item: &[u8])
Push a given node (defined as bytes) to the internal graph definition
Trait Implementations§
Source§impl Debug for DefinitionGraph
impl Debug for DefinitionGraph
Source§impl<'de> Deserialize<'de> for DefinitionGraph
impl<'de> Deserialize<'de> for DefinitionGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DefinitionGraph
impl RefUnwindSafe for DefinitionGraph
impl Send for DefinitionGraph
impl Sync for DefinitionGraph
impl Unpin for DefinitionGraph
impl UnwindSafe for DefinitionGraph
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