pub struct MethodRecipe { /* private fields */ }Expand description
Stores declared local edges and a repeatable, owning native method factory.
Factories must create fresh execution state satisfying Method’s contract.
Their returned method’s positional edges and types must match the declarations.
Immutable captured configuration may be shared.
§Examples
See the module example.
Implementations§
Source§impl MethodRecipe
impl MethodRecipe
Sourcepub fn new<F>(
inputs: &[CellSlot],
outputs: &[CellSlot],
make: F,
) -> Result<Self, TemplateError>
pub fn new<F>( inputs: &[CellSlot], outputs: &[CellSlot], make: F, ) -> Result<Self, TemplateError>
Creates a recipe whose local edges all belong to one owner.
§Errors
Returns TemplateError::ForeignHandle for mixed owners, or
TemplateError::InvalidDefinition for empty or repeated outputs.
- Complexity: O(i + o²) time and O(i + o) space for edge counts i and o.
§Examples
See the module example.
Auto Trait Implementations§
impl !RefUnwindSafe for MethodRecipe
impl !Send for MethodRecipe
impl !Sync for MethodRecipe
impl !UnwindSafe for MethodRecipe
impl Freeze for MethodRecipe
impl Unpin for MethodRecipe
impl UnsafeUnpin for MethodRecipe
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