pub struct Program {
pub root: String,
pub tools: Vec<(Identity, TypeSpec)>,
pub types: Vec<Template>,
}Expand description
One program as the --contract file lists it (abi.md, Binding).
Fields§
§root: StringThe path of the file it was formed from.
tools: Vec<(Identity, TypeSpec)>Each Tool’s identity and description, whose declarations are
empty: its terms index types.
types: Vec<Template>The program’s type map, in first-reach order over the Tools.
Trait Implementations§
impl Eq for Program
Source§impl Shaped for Program
impl Shaped for Program
Source§fn write_at(
&self,
out: &mut ValueWriter<'_, '_>,
ty: &Type,
) -> Result<(), EncodeError>
fn write_at( &self, out: &mut ValueWriter<'_, '_>, ty: &Type, ) -> Result<(), EncodeError>
Source§fn read_at(
input: &mut ValueReader<'_, '_, '_>,
ty: &Type,
) -> Result<Self, DecodeError>
fn read_at( input: &mut ValueReader<'_, '_, '_>, ty: &Type, ) -> Result<Self, DecodeError>
impl StructuralPartialEq for Program
Source§impl Wire for Program
impl Wire for Program
Source§fn write_head<'a>(&'a self, _: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
fn write_head<'a>(&'a self, _: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
Appends the bytes it writes before its parts to
out, and pushes
its parts to parts in the order they are written after them.Source§fn open(_: &mut Reader<'_>) -> Result<Opened, DecodeError>
fn open(_: &mut Reader<'_>) -> Result<Opened, DecodeError>
Reads its head at
reader: the value itself when it has no parts,
else its parts to read and what joins them. Read moreSource§fn write(&self, out: &mut Vec<u8>)
fn write(&self, out: &mut Vec<u8>)
Appends its bytes to
out: its head, and then each part’s bytes in
order, written over a stack on the heap, so a value nested however
deep is written on a native stack of fixed size.Auto Trait Implementations§
impl Forget for Program
impl Freeze for Programwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(Identity, TypeSpec)>: Freeze,
PhantomData<Template>: Freeze,
impl Move for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Programwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(Identity, TypeSpec)>: UnsafeUnpin,
PhantomData<Template>: UnsafeUnpin,
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> AnyWire for Twhere
T: Wire,
impl<T> AnyWire for Twhere
T: Wire,
Source§fn write_head<'a>(&'a self, out: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
fn write_head<'a>(&'a self, out: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
As
Wire::write_head.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