Crate rtile

Source
Expand description

rtile provides a way to work with rectangular areas of text as atomic units which can be used for code generation.

use rtile::prelude::*;
kp!(greet_one, "Welcome to rtile!     ");
tp!(greet_two, "Have a great day!");
assert_eq!(ts!("@{greet_one}@{greet_two}"), "Welcome to rtile!     Have a great day!");

Modules§

prelude
Prelude for RTile

Macros§

gtp
get the tile which is persisted in the tls (thread local storage)
gtq
get the tile which is persisted in the tls (thread local storage) using a variable containing a string value
k
k! is to expand any inner tiles, to keep the white spaces (i.e. do not trim any white spaces around the block) and return a tile
kf
kf! is used to flatten the multilines of the tile output into a single string, without trimming the white spaces. i.e. keep the white spaces
kk
kk! is to used to expand the inner tiles, by keeping the white spaces (i.e. do not trim any white spaces around the block) and return a tile
kkp
kkp! is to used to expand the inner tiles, by keeping the white spaces (i.e. do not trim any white spaces around the block), persist the result to tls (thread local storage) using a string literal and return a tile
kkq
kkq! is to used to expand the inner tiles, by keeping the white spaces (i.e. do not trim any white spaces around the block), persist the result to tls (thread local storage) using a variable having a string value and return a tile
kp
kp! is to expand any inner tiles, to keep the white spaces (i.e. do not trim any white spaces around the block), with a given name (string literal) and return a tile
kq
kq! is to expand any inner tiles, to keep the white spaces (i.e. do not trim any white spaces around the block), with a variable having a string value and return a tile
ks
ks! is to expand any inner tiles by keeping the white spaces (i.e. do not trim any white spaces around the block) and return a String
sr
sr! returns the trimmed raw data of a tile
stp
give a name to a tile using any string literal and persist it in tls (thread local storage)
stq
give a name to a tile using a variable containing a string value and persist it in tls (thread local storage)
t
t! is to expand any inner tiles and to trim the white spaces around the block of text and return a tile
tf
tf! is used to flatten the multilines of the tile output into a single string
tp
tp! is to used to persist the tile into the tls (thread local storage), with a given name (string literal) and return a tile
tq
tq! is to used to persist the tile into the tls (thread local storage), with a variable having a string value and return a tile
ts
ts! is to expand any inner tiles and to trim the white spaces around the block of text and return a String
tt
tt! is to used to expand the inner tiles and return the expanded ouput as a trimmed tile
ttp
ttp! is to used to expand the inner tiles, persist the result to tls (thread local storage) using a string literal and return a trimmed tile
ttq
ttq! is to used to expand the inner tiles, persist the result to tls (thread local storage) using a variable name and return a trimmed tile

Functions§

clear_tiles
clear_tiles, used to remove all tiles from the tls (thread local storage)
get_blank_tiles
get_blank_tiles, used to return blank tiles stored in the tls (thread local storage)
remove_tile
remove_tile, used to remove a tile by name from the tls (thread local storage)