pub struct Catalog { /* private fields */ }Expand description
The operations an app offers, and the port types it declares.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn new(types: impl IntoIterator<Item = Type>) -> Self
pub fn new(types: impl IntoIterator<Item = Type>) -> Self
An empty catalog for an app whose data flows as types.
Sourcepub fn add(&mut self, spec: OpSpec) -> Result<(), String>
pub fn add(&mut self, spec: OpSpec) -> Result<(), String>
Adds spec (replacing one with its id), after checking it is well formed and names only
the app’s types.
Sourcepub fn by_family(&self) -> Vec<(String, Vec<&OpSpec>)>
pub fn by_family(&self) -> Vec<(String, Vec<&OpSpec>)>
The operations by family, families and operations by name (the Operations menu). Scripts without a family go under “Scripts”, tools’ under their tool’s name.
Sourcepub fn taking(&self, ty: &Type) -> Vec<&OpSpec>
pub fn taking(&self, ty: &Type) -> Vec<&OpSpec>
The operations that take an input of type ty (what can follow a node’s output).
Sourcepub fn fillable_by(&self, offers: &[Type]) -> Vec<&OpSpec>
pub fn fillable_by(&self, offers: &[Type]) -> Vec<&OpSpec>
The ops a screen’s offers can run: every required input filled by one of offers (the
runtime’s ops with fillable_by, standard §6.1).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Catalog
impl Freeze for Catalog
impl Move for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalogwhere
*const LeafNode<String, OpSpec> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, OpSpec)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Type>: UnsafeUnpin,
impl UnwindSafe for Catalog
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