File: coerce.R

package info (click to toggle)
r-cran-blob 1.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 188 kB
  • sloc: sh: 13; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 892 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#' Coercion
#'
#' Double dispatch methods to support [vctrs::vec_ptype2()].
#'
#' @inheritParams vctrs::vec_ptype2
#'
#' @method vec_ptype2 blob
#' @export
#' @export vec_ptype2.blob
vec_ptype2.blob <- function(x, y, ..., x_arg = "", y_arg = "") UseMethod("vec_ptype2.blob", y)

#' @method vec_ptype2.blob default
#' @export
vec_ptype2.blob.default <- function(x, y, ..., x_arg = "", y_arg = "") {
  vec_default_ptype2(x, y, x_arg = x_arg, y_arg = y_arg)
}

#' @method vec_ptype2.blob blob
#' @export
vec_ptype2.blob.blob <- function(x, y, ...) {
  new_blob(list())
}

#' @method vec_ptype2.blob list
#' @export
vec_ptype2.blob.list <- function(x, y, ..., x_arg = "", y_arg = "") {
  check_raw_list(y, y_arg)
  new_blob(list())
}

#' @method vec_ptype2.list blob
#' @export
vec_ptype2.list.blob <- function(x, y, ..., x_arg = "", y_arg = "") {
  check_raw_list(x, x_arg)
  new_blob(list())
}