pub struct RawBlockInput {
pub shadow: u8,
pub kind: u8,
pub value: Value,
}Expand description
The RawBlockInput struct represents an input to a block in its raw form in a Scratch 3.0
project.
Fields§
§shadow: u8The shadow type of the block.
1 for shadow block,
2 for non-shadow block.
3 for shadow block but is obscured by a non-shadow block.
kind: u8The type of the input.
4 to 8 for a number.
9 for hex color string.
10 for string.
11 for broadcast.
12 and 13 for variables and lists, respectively.
A variant is used by this crate to represent a block reference (i.e., when the input is
another block). In this case, the kind will be 0, and the value will be a string
of the block ID.
value: ValueThe value of the input.
number for 4 to 8,
string for 9 to 13.
Trait Implementations§
Source§impl Clone for RawBlockInput
impl Clone for RawBlockInput
Source§fn clone(&self) -> RawBlockInput
fn clone(&self) -> RawBlockInput
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 RawBlockInput
impl Debug for RawBlockInput
Source§impl<'de> Deserialize<'de> for RawBlockInput
impl<'de> Deserialize<'de> for RawBlockInput
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 RawBlockInput
impl PartialEq for RawBlockInput
impl StructuralPartialEq for RawBlockInput
Auto Trait Implementations§
impl Freeze for RawBlockInput
impl RefUnwindSafe for RawBlockInput
impl Send for RawBlockInput
impl Sync for RawBlockInput
impl Unpin for RawBlockInput
impl UnwindSafe for RawBlockInput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more