Function wasmtime_wasi::subscribe
source · pub fn subscribe<T>(
table: &mut ResourceTable,
resource: Resource<T>,
) -> Result<Resource<Pollable>>where
T: Subscribe,
Expand description
Creates a pollable
resource which is subscribed to the provided
resource
.
If resource
is an owned resource then it will be deleted when the returned
resource is deleted. Otherwise the returned resource is considered a “child”
of the given resource
which means that the given resource cannot be
deleted while the pollable
is still alive.