Struct netsblox_vm::runtime::Image
source · pub struct Image {
pub content: Vec<u8>,
pub center: Option<(Number, Number)>,
}Expand description
An image type that can be used in the VM.
Fields§
§content: Vec<u8>The raw binary content of the image
center: Option<(Number, Number)>The center (x, y) of the image as used for NetsBlox sprites.
None is implied to represent (w / 2, h / 2) based on the true image size (size decoding cannot be done in no-std).
Trait Implementations§
source§impl From<Image> for SimpleValue
impl From<Image> for SimpleValue
source§impl PartialEq for Image
impl PartialEq for Image
impl Eq for Image
impl StructuralEq for Image
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.