pub struct ThreadObject { /* private fields */ }Implementations§
Source§impl ThreadObject
impl ThreadObject
pub fn new(state: DurableObjectState, env: Env) -> Self
pub fn fetch(&self, req: Request) -> Promise
pub fn alarm(&self) -> Promise
pub fn websocket_message(&self, ws: WebSocket, message: JsValue) -> Promise
pub fn websocket_close( &self, ws: WebSocket, code: usize, reason: String, was_clean: bool, ) -> Promise
pub fn websocket_error(&self, ws: WebSocket, error: JsValue) -> Promise
Trait Implementations§
Source§impl DurableObject for ThreadObject
impl DurableObject for ThreadObject
fn new(state: State, env: Env) -> Self
async fn fetch(&self, req: Request) -> Result<Response>
async fn alarm(&self) -> Result<Response, Error>
async fn websocket_message( &self, ws: WebSocket, message: WebSocketIncomingMessage, ) -> Result<(), Error>
async fn websocket_close( &self, ws: WebSocket, code: usize, reason: String, was_clean: bool, ) -> Result<(), Error>
async fn websocket_error( &self, ws: WebSocket, error: Error, ) -> Result<(), Error>
Source§impl From<ThreadObject> for JsValue
impl From<ThreadObject> for JsValue
Source§fn from(value: ThreadObject) -> Self
fn from(value: ThreadObject) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ThreadObject
impl FromWasmAbi for ThreadObject
Source§impl IntoWasmAbi for ThreadObject
impl IntoWasmAbi for ThreadObject
Source§impl LongRefFromWasmAbi for ThreadObject
impl LongRefFromWasmAbi for ThreadObject
Source§type Abi = WasmPtr<WasmRefCell<ThreadObject>>
type Abi = WasmPtr<WasmRefCell<ThreadObject>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<ThreadObject>
type Anchor = RcRef<ThreadObject>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for ThreadObject
impl OptionFromWasmAbi for ThreadObject
Source§impl OptionIntoWasmAbi for ThreadObject
impl OptionIntoWasmAbi for ThreadObject
Source§impl RefFromWasmAbi for ThreadObject
impl RefFromWasmAbi for ThreadObject
Source§type Abi = WasmPtr<WasmRefCell<ThreadObject>>
type Abi = WasmPtr<WasmRefCell<ThreadObject>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<ThreadObject>
type Anchor = RcRef<ThreadObject>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for ThreadObject
impl RefMutFromWasmAbi for ThreadObject
Source§type Abi = WasmPtr<WasmRefCell<ThreadObject>>
type Abi = WasmPtr<WasmRefCell<ThreadObject>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<ThreadObject>
type Anchor = RcRefMut<ThreadObject>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for ThreadObject
impl TryFromJsValue for ThreadObject
Source§impl VectorFromWasmAbi for ThreadObject
impl VectorFromWasmAbi for ThreadObject
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ThreadObject]>
Source§impl VectorIntoWasmAbi for ThreadObject
impl VectorIntoWasmAbi for ThreadObject
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ThreadObject]>) -> Self::Abi
Source§impl WasmDescribeVector for ThreadObject
impl WasmDescribeVector for ThreadObject
impl SupportsConstructor for ThreadObject
impl SupportsInstanceProperty for ThreadObject
impl SupportsStaticProperty for ThreadObject
Auto Trait Implementations§
impl Freeze for ThreadObject
impl RefUnwindSafe for ThreadObject
impl Send for ThreadObject
impl Sync for ThreadObject
impl Unpin for ThreadObject
impl UnsafeUnpin for ThreadObject
impl UnwindSafe for ThreadObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.