R/rowid-type.R
raw| 1 | style_star <- function(x) { |
| 2 | style_hint(x) |
| 3 | } |
| 4 | |
| 5 | rif_type <- function(has_star, ...) { |
| 6 | star <- if (has_star) "*" else "" |
| 7 | ret <- structure( |
| 8 | list( |
| 9 | star = star |
| 10 | ), |
| 11 | class = "pillar_rif_type" |
| 12 | ) |
| 13 | ret <- set_width(ret, 1L) |
| 14 | ret |
| 15 | } |
| 16 | |
| 17 | #' @export |
| 18 | format.pillar_rif_type <- function(x, width = NULL, ...) { |
| 19 | style_star(x$star) |
| 20 | } |