pub struct Block {
pub opcode: String,
pub next: Option<BlockID>,
pub inputs: HashMap<String, Value>,
pub fields: HashMap<String, Vec<Option<String>>>,
pub top_level: bool,
}
Expand description
Blocks are the rectangle and oval code blocks.
Fields§
§opcode: String
§next: Option<BlockID>
Block attached below this block
inputs: HashMap<String, Value>
Inputs are the oval holes in blocks where you can drop oval blocks into
fields: HashMap<String, Vec<Option<String>>>
Fields are the drop downs in blocks and therefore can only take constant strings
top_level: bool
Top most block in a stack of connected blocks
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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