pub struct Descriptor {
pub lang: String,
pub body: String,
pub inputs: Vec<String>,
pub signature: Signature,
}Expand description
A function descriptor (7): signature, code and declared inputs.
Fields§
§lang: Stringcode.lang, e.g. stored.
body: Stringcode.body, opaque to this crate.
inputs: Vec<String>Fully qualified names of the functions this one may read, ascending.
signature: SignatureThe signature.
Implementations§
Source§impl Descriptor
impl Descriptor
Sourcepub fn from_json(bytes: &[u8]) -> Result<Descriptor>
pub fn from_json(bytes: &[u8]) -> Result<Descriptor>
Parses a descriptor from JSON text: strict JSON, structure, canonical form (7).
Sourcepub fn from_value(v: &Value) -> Result<Descriptor>
pub fn from_value(v: &Value) -> Result<Descriptor>
Checks a parsed JSON value as a descriptor.
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§impl Debug for Descriptor
impl Debug for Descriptor
impl Eq for Descriptor
Source§impl Hash for Descriptor
impl Hash for Descriptor
Source§impl PartialEq for Descriptor
impl PartialEq for Descriptor
impl StructuralPartialEq for Descriptor
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnsafeUnpin for Descriptor
impl UnwindSafe for Descriptor
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