pub struct NodeDescriptor {
pub id: NodeId,
pub descriptor: String,
pub configuration: Option<Configuration>,
}Expand description
Describes an node of the graph
id : PrintSink
descriptor: file://./target/release/counter_source.yaml
configuration:
start: 10Fields§
§id: NodeId§descriptor: String§configuration: Option<Configuration>Implementations§
Source§impl NodeDescriptor
impl NodeDescriptor
Sourcepub fn from_yaml(data: &str) -> Result<Self>
pub fn from_yaml(data: &str) -> Result<Self>
Creates a new NodeDescriptor from its YAML representation.
§Errors
A variant error is returned if deserialization fails.
Sourcepub fn from_json(data: &str) -> Result<Self>
pub fn from_json(data: &str) -> Result<Self>
Creates a new NodeDescriptor from its JSON representation.
§Errors
A variant error is returned if deserialization fails.
Sourcepub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
Returns the JSON representation of the NodeDescriptor.
§Errors
A variant error is returned if serialization fails.
Sourcepub fn to_yaml(&self) -> Result<String>
pub fn to_yaml(&self) -> Result<String>
Returns the YAML representation of the NodeDescriptor.
§Errors
A variant error is returned if serialization fails.
Sourcepub async fn flatten(
self,
id: NodeId,
links: &mut Vec<LinkDescriptor>,
global_configuration: Option<Configuration>,
ancestors: &mut Vec<String>,
) -> Result<Vec<OperatorDescriptor>>
pub async fn flatten( self, id: NodeId, links: &mut Vec<LinkDescriptor>, global_configuration: Option<Configuration>, ancestors: &mut Vec<String>, ) -> Result<Vec<OperatorDescriptor>>
Flattens the NodeDescriptor by loading all the composite operators
§Errors
A variant error is returned if loading operators fails. Or if the node does not contains an operator
Sourcepub async fn load_source(
self,
global_configuration: Option<Configuration>,
) -> Result<SourceDescriptor>
pub async fn load_source( self, global_configuration: Option<Configuration>, ) -> Result<SourceDescriptor>
Loads the source from the NodeDescriptor
§Errors
A variant error is returned if loading source fails. Or if the node does not contains an source
Sourcepub async fn load_sink(
self,
global_configuration: Option<Configuration>,
) -> Result<SinkDescriptor>
pub async fn load_sink( self, global_configuration: Option<Configuration>, ) -> Result<SinkDescriptor>
Loads the sink from the NodeDescriptor
§Errors
A variant error is returned if loading sink fails. Or if the node does not contains an sink
Trait Implementations§
Source§impl Clone for NodeDescriptor
impl Clone for NodeDescriptor
Source§fn clone(&self) -> NodeDescriptor
fn clone(&self) -> NodeDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeDescriptor
impl Debug for NodeDescriptor
Source§impl<'de> Deserialize<'de> for NodeDescriptor
impl<'de> Deserialize<'de> for NodeDescriptor
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>,
Source§impl Display for NodeDescriptor
impl Display for NodeDescriptor
Source§impl PartialEq for NodeDescriptor
impl PartialEq for NodeDescriptor
Source§impl Serialize for NodeDescriptor
impl Serialize for NodeDescriptor
impl Eq for NodeDescriptor
impl StructuralPartialEq for NodeDescriptor
Auto Trait Implementations§
impl Freeze for NodeDescriptor
impl RefUnwindSafe for NodeDescriptor
impl Send for NodeDescriptor
impl Sync for NodeDescriptor
impl Unpin for NodeDescriptor
impl UnwindSafe for NodeDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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