Skip to main content

Pipeline

Struct Pipeline 

Source
pub struct Pipeline {
    pub version: u32,
    pub app: String,
    pub sources: BTreeMap<String, Type>,
    pub nodes: BTreeMap<String, Node>,
    pub edges: Vec<Edge>,
    pub outputs: BTreeMap<String, Endpoint>,
    pub layout: Layout,
}
Expand description

A pipeline.

Fields§

§version: u32

The format’s version (PIPELINE_VERSION); kitchen_pipeline before the standard.

§app: String

The app it was made in (lucem, dspk): its operations are named here.

§sources: BTreeMap<String, Type>

The graph’s inputs, by name, with their type.

§nodes: BTreeMap<String, Node>

The operations, by node id.

§edges: Vec<Edge>

The connections.

§outputs: BTreeMap<String, Endpoint>

What is written, by name: an output port of a node (or a source, written as read).

§layout: Layout

Where an editor draws the sources and outputs (nodes carry their own Node::at); the run ignores it.

Implementations§

Source§

impl Pipeline

Source

pub fn new(app: impl Into<String>) -> Self

An empty pipeline of app.

Source

pub fn from_json(text: &str) -> Result<Pipeline, String>

Reads a pipeline from JSON; a newer format is refused with what to do.

Source

pub fn to_json(&self) -> String

The graph as JSON, keys in order (diffs stay small).

Source

pub fn connect(&mut self, from: Endpoint, to: Endpoint)

Connects from to to (replacing what fed to).

Source

pub fn check(&self, catalog: &Catalog) -> Result<Plan, Vec<Problem>>

Checks the graph against catalog: every problem, or the plan.

Trait Implementations§

Source§

impl Clone for Pipeline

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pipeline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Pipeline

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Pipeline

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for Pipeline

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Pipeline

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Pipeline

Auto Trait Implementations§

§

impl Forget for Pipeline

§

impl Freeze for Pipeline
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const LeafNode<String, Type> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Type)>>: Freeze, *const LeafNode<String, Node> is !null: Freeze, PhantomData<Box<(String, Node)>>: Freeze, PhantomData<Edge>: Freeze, *const LeafNode<String, Endpoint> is !null: Freeze, PhantomData<Box<(String, Endpoint)>>: Freeze, *const LeafNode<String, [f32; 2]> is !null: Freeze, PhantomData<Box<(String, [f32; 2])>>: Freeze,

§

impl Move for Pipeline

§

impl RefUnwindSafe for Pipeline

§

impl Send for Pipeline
where RawVecInner: Send, NodeRef<Owned, String, Type, LeafOrInternal>: Send, BoxRaw<(String, Type)>: Send, NodeRef<Owned, String, Node, LeafOrInternal>: Send, BoxRaw<(String, Node)>: Send, NodeRef<Owned, String, Endpoint, LeafOrInternal>: Send, BoxRaw<(String, Endpoint)>: Send, NodeRef<Owned, String, [f32; 2], LeafOrInternal>: Send, BoxRaw<(String, [f32; 2])>: Send,

§

impl Sync for Pipeline
where RawVecInner: Sync, NodeRef<Owned, String, Type, LeafOrInternal>: Sync, BoxRaw<(String, Type)>: Sync, NodeRef<Owned, String, Node, LeafOrInternal>: Sync, BoxRaw<(String, Node)>: Sync, NodeRef<Owned, String, Endpoint, LeafOrInternal>: Sync, BoxRaw<(String, Endpoint)>: Sync, NodeRef<Owned, String, [f32; 2], LeafOrInternal>: Sync, BoxRaw<(String, [f32; 2])>: Sync,

§

impl Unpin for Pipeline
where *const u8 is !null: Unpin, *const LeafNode<String, Type> is !null: Unpin, Box<(String, Type)>: Unpin, *const LeafNode<String, Node> is !null: Unpin, Box<(String, Node)>: Unpin, *const LeafNode<String, Endpoint> is !null: Unpin, Box<(String, Endpoint)>: Unpin, *const LeafNode<String, [f32; 2]> is !null: Unpin, Box<(String, [f32; 2])>: Unpin,

§

impl UnsafeUnpin for Pipeline

§

impl UnwindSafe for Pipeline

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.