rush_assertions: Assertion for Rush Objects

rush_assertionsR Documentation

Assertion for Rush Objects

Description

Most assertion functions ensure the right class attribute, and optionally additional properties. If an assertion fails, an exception is raised. Otherwise, the input object is returned invisibly.

Usage

assert_rush(rush, null_ok = FALSE)

assert_rushs(rushs, null_ok = FALSE)

assert_rush_worker(worker, null_ok = FALSE)

assert_rush_workers(workers, null_ok = FALSE)

Arguments

rush

(Rush).

null_ok

(logical(1)). If TRUE, NULL is allowed.

rushs

(list of Rush).

worker

(RushWorker).

workers

(list of RushWorker).

Value

Exception if the assertion fails, otherwise the input object invisibly.

Examples

# This example is not executed since Redis must be installed

   config_local = redux::redis_config()
   rush = rsh(network_id = "test_network", config = config_local)

   assert_rush(rush)


rush documentation built on Sept. 11, 2024, 9:15 p.m.