pub(crate) struct ChainCode {
pub body: TokenStream,
pub slots: Vec<Slots>,
pub bindings: Vec<(Ident, bool)>,
}Expand description
Generated code for one chain.
Fields§
§body: TokenStreamThe chain’s body: evaluates to (slots..., Option<(bindings...)>).
slots: Vec<Slots>Exit slots per member, in program order.
bindings: Vec<(Ident, bool)>Bindings handed back to the enclosing scope, with their mut flag.
Implementations§
Source§impl ChainCode
impl ChainCode
Sourcepub fn slot_idents(&self) -> Vec<Ident>
pub fn slot_idents(&self) -> Vec<Ident>
All slot variables, matching the order of the body’s result tuple.
Sourcepub fn binding_pattern(&self) -> TokenStream
pub fn binding_pattern(&self) -> TokenStream
(mut a, b,): the pattern that rebinds the handed-back values.
Auto Trait Implementations§
impl Freeze for ChainCode
impl RefUnwindSafe for ChainCode
impl !Send for ChainCode
impl !Sync for ChainCode
impl Unpin for ChainCode
impl UnsafeUnpin for ChainCode
impl UnwindSafe for ChainCode
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