pub struct RawSprite {Show 16 fields
pub name: String,
pub variables: HashMap<String, RawVariable>,
pub lists: HashMap<String, (String, Vec<Value>)>,
pub blocks: HashMap<String, RawBlock>,
pub current_costume: usize,
pub costumes: Vec<RawCostume>,
pub sounds: Vec<RawSound>,
pub volume: u8,
pub layer_order: isize,
pub visible: bool,
pub x: i32,
pub y: i32,
pub size: u32,
pub direction: i32,
pub draggable: bool,
pub rotation_style: String,
}Expand description
The RawSprite struct represents a sprite in its raw form in a Scratch 3.0 project.
Fields§
§name: StringThe name of the sprite.
variables: HashMap<String, RawVariable>The variables of the sprite.
lists: HashMap<String, (String, Vec<Value>)>The lists of the sprite.
blocks: HashMap<String, RawBlock>The blocks of the sprite stored as a map from block ID to RawBlock.
current_costume: usizeThe index of the current costume.
costumes: Vec<RawCostume>The costumes of the sprite.
sounds: Vec<RawSound>The sounds of the sprite.
volume: u8The volume of the sprite.
layer_order: isizeThe layer of the sprite.
visible: boolIf the sprite is visible.
x: i32The x position of the sprite.
y: i32The y position of the sprite.
size: u32The size of the sprite.
direction: i32The direction of the sprite.
draggable: boolIf the sprite is draggable.
rotation_style: StringThe rotation style of the sprite.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawSprite
impl<'de> Deserialize<'de> for RawSprite
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 RawSprite
impl RefUnwindSafe for RawSprite
impl Send for RawSprite
impl Sync for RawSprite
impl Unpin for RawSprite
impl UnwindSafe for RawSprite
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> 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