pub struct BlockNormal {
pub opcode: OpCode,
pub comment: Option<Uid>,
pub next: Option<Uid>,
pub parent: Option<Uid>,
pub inputs: StringHashMap<BlockInput>,
pub fields: StringHashMap<BlockField>,
pub shadow: bool,
pub top_level: bool,
pub mutation: Option<BlockMutation>,
pub x: Option<Number>,
pub y: Option<Number>,
}Expand description
Scratch scripting block
Fields§
§opcode: OpCodeA string naming the block.
comment: Option<Uid>Wiki says nothing about this, probably comment id that this block attached to.
next: Option<Uid>The Id of the next block or null.
parent: Option<Uid>If the block is a stack block and is preceded, this is the Id of the preceding block. If the block is the first stack block in a C mouth, this is the Id of the C block. If the block is an input to another block, this is the Id of that other block. Otherwise it is none.
inputs: StringHashMap<BlockInput>See BlockInput
fields: StringHashMap<BlockField>See BlockField
shadow: boolTrue if this is a shadow block and false otherwise.
top_level: boolFalse if the block has a parent and true otherwise.
mutation: Option<BlockMutation>Mutations are present some blocks that has a certain opcode.
See BlockMutationEnum for availiable mutations.
x: Option<Number>X Position of the top level block.
y: Option<Number>Y Position of the top level block.
Trait Implementations§
Source§impl Clone for BlockNormal
impl Clone for BlockNormal
Source§fn clone(&self) -> BlockNormal
fn clone(&self) -> BlockNormal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockNormal
impl Debug for BlockNormal
Source§impl Default for BlockNormal
impl Default for BlockNormal
Source§impl<'de> Deserialize<'de> for BlockNormal
impl<'de> Deserialize<'de> for BlockNormal
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
Source§impl PartialEq for BlockNormal
impl PartialEq for BlockNormal
Source§impl Serialize for BlockNormal
impl Serialize for BlockNormal
impl StructuralPartialEq for BlockNormal
Auto Trait Implementations§
impl Freeze for BlockNormal
impl RefUnwindSafe for BlockNormal
impl Send for BlockNormal
impl Sync for BlockNormal
impl Unpin for BlockNormal
impl UnwindSafe for BlockNormal
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