pub fn subscribe<T>(
table: &mut ResourceTable,
resource: Resource<T>,
) -> Result<Resource<DynPollable>, Error>where
T: Pollable,
Expand description
Creates a wasi:io/poll/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.