plinth/cloudflare/durable_object
Types
pub type AlarmInvocationInfo {
AlarmInvocationInfo(retry_count: Int, is_retry: Bool)
}
Constructors
-
AlarmInvocationInfo(retry_count: Int, is_retry: Bool)
pub type GetOptions {
GetOptions(allow_concurrency: Bool, no_cache: Bool)
}
Constructors
-
GetOptions(allow_concurrency: Bool, no_cache: Bool)
pub type NonConcurrentPromise(t)
pub type SqlStorageCursor
pub type UpdateOptions {
UpdateOptions(allow_unconfirmed: Bool, no_cache: Bool)
}
Constructors
-
UpdateOptions(allow_unconfirmed: Bool, no_cache: Bool)
Values
pub fn alarm_invocation_info_decoder(
,
) -> decode.Decoder(AlarmInvocationInfo)
pub fn await(
p: NonConcurrentPromise(t),
then: fn(t) -> NonConcurrentPromise(u),
) -> NonConcurrentPromise(u)
pub fn block_concurrency_while(
state: State,
action: fn() -> promise.Promise(t),
) -> NonConcurrentPromise(t)
pub fn database_size(storage: Sql) -> Int
pub fn delete_alarm(
storage: Storage,
) -> NonConcurrentPromise(Nil)
pub fn exec(
storage: Sql,
query: String,
bindings: List(String),
) -> SqlStorageCursor
pub fn get_alarm(
storage: Storage,
) -> NonConcurrentPromise(Result(Int, Nil))
pub fn get_default() -> GetOptions
pub fn get_many(
storage: Storage,
keys: List(String),
options: GetOptions,
) -> NonConcurrentPromise(Result(dynamic.Dynamic, Nil))
pub fn get_one(
storage: Storage,
key: String,
options: GetOptions,
) -> NonConcurrentPromise(Result(dynamic.Dynamic, Nil))
pub fn id_from_string(namespace: Namespace, id: String) -> Id
This is the string value of the objects id, not its name.
pub fn new_unique_id(jurisdiction: option.Option(String)) -> Id
pub fn put_one(
storage: Storage,
key: String,
value: json.Json,
options: UpdateOptions,
) -> NonConcurrentPromise(Nil)
pub fn resolve(value: t) -> NonConcurrentPromise(t)
pub fn rpc(
stub: Stub,
method: String,
args: List(json.Json),
) -> promise.Promise(Result(json.Json, String))
pub fn set_alarm(
storage: Storage,
scheduled_time: Int,
) -> NonConcurrentPromise(Nil)
pub fn to_promise(
p: NonConcurrentPromise(t),
) -> promise.Promise(t)
pub fn update_default() -> UpdateOptions