| 1 |
#' @export |
| 2 |
pillar_shaft.vctrs_unspecified <- function(x, ...) { |
| 3 |
new_pillar_shaft_simple(rep(".", vec_size(x)), align = "right") |
| 4 |
} |
| 5 |
|
| 6 |
#' @export |
| 7 |
pillar_shaft.vctrs_vctr <- function(x, ...) { |
| 8 |
align <- if (is_character(x)) "left" else "right" |
| 9 |
new_pillar_shaft_simple(format(x), align = align) |
| 10 |
} |
| 11 |
|
| 12 |
#' @export |
| 13 |
type_sum.vctrs_vctr <- function(x) { |
| 14 |
pillar_attr <- attr(x, "pillar", exact = TRUE) |
| 15 |
|
| 16 |
label <- pillar_attr$label |
| 17 |
if (!is.null(label)) { |
| 18 |
return(I(label)) |
| 19 |
} |
| 20 |
|
| 21 |
vec_ptype_abbr(x) |
| 22 |
} |
| 23 |
|
| 24 |
#' @export |
| 25 |
pillar_shaft.vctrs_list_of <- function(x, ...) { |
| 26 |
out <- style_subtle(map_chr(x, size_sum)) |
| 27 |
|
| 28 |
new_pillar_shaft_simple(out, align = "right") |
| 29 |
} |