File: is.promise.Rd

package info (click to toggle)
r-cran-promises 1.2.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,420 kB
  • sloc: cpp: 45; sh: 13; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 986 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/promise.R
\name{is.promise}
\alias{is.promise}
\alias{is.promising}
\alias{as.promise}
\title{Coerce to a promise}
\usage{
is.promise(x)

is.promising(x)

as.promise(x)
}
\arguments{
\item{x}{An R object to test or coerce.}
}
\value{
\code{as.promise} returns a promise object, or throws an error if the
object cannot be converted.

\code{is.promise} returns \code{TRUE} if the given value is a promise object, and
\code{FALSE} otherwise.

\code{is.promising} returns \code{TRUE} if the given value is a promise object or
if it can be converted to a promise object using \code{as.promise}, and \code{FALSE}
otherwise.
}
\description{
Use \code{is.promise} to determine whether an R object is a promise. Use
\code{as.promise} (an S3 generic method) to attempt to coerce an R object to a
promise. This package includes support for converting \link[future:Future-class]{future::Future}
objects into promises.
}