Check if an object is a g6_port
Examples
p <- g6_port("input-1", type = "input")
is_g6_port(p)
#> [1] TRUE
is_g6_port(list(key = "input-1", type = "input"))
#> [1] FALSE
is_g6_port(as_g6_port(list(key = "input-1", type = "input")))
#> [1] TRUE
is_g6_ports(g6_ports(
g6_port("input-1", type = "input"),
g6_port("output-1", type = "output")
))
#> [1] TRUE