pub struct TileBuilder {
pub command: Option<Vec<String>>,
pub coords: Option<(u16, u16)>,
pub position: Option<(u16, u16)>,
pub size: Option<(u16, u16)>,
pub sender: Option<Sender<Msg>>,
}Expand description
A helper to build tiles.
Fields§
§command: Option<Vec<String>>The command that the tile will run.
coords: Option<(u16, u16)>The coordinates of the tile.
position: Option<(u16, u16)>The top left corner of the tile.
size: Option<(u16, u16)>The size of the tile.
sender: Option<Sender<Msg>>The sender to communicate with the main view.
Implementations§
Source§impl TileBuilder
impl TileBuilder
Sourcepub fn new() -> TileBuilder
pub fn new() -> TileBuilder
Creates an empty tile builder.
Sourcepub fn command(self, command: Vec<String>) -> TileBuilder
pub fn command(self, command: Vec<String>) -> TileBuilder
Sets the command of the tile.
Sourcepub fn coords(self, coords: (u16, u16)) -> TileBuilder
pub fn coords(self, coords: (u16, u16)) -> TileBuilder
Sets the coordinates of the tile.
Sourcepub fn position(self, position: (u16, u16)) -> TileBuilder
pub fn position(self, position: (u16, u16)) -> TileBuilder
Sets the position of the tile.
Sourcepub fn size(self, size: (u16, u16)) -> TileBuilder
pub fn size(self, size: (u16, u16)) -> TileBuilder
Sets the size of the tile.
Sourcepub fn sender(self, sender: Sender<Msg>) -> TileBuilder
pub fn sender(self, sender: Sender<Msg>) -> TileBuilder
Sets the sender of the tile.
Auto Trait Implementations§
impl Freeze for TileBuilder
impl RefUnwindSafe for TileBuilder
impl Send for TileBuilder
impl Sync for TileBuilder
impl Unpin for TileBuilder
impl UnwindSafe for TileBuilder
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