1 2 3 4 5 6 7 8 9 10 11 12 13
use crate::components::{Asset, Component}; pub struct Image { pub asset: Asset, } impl Image { pub fn new(asset: impl Into<Asset>) -> Component { Component::Image(Self { asset: asset.into(), }) } }