pub struct State { /* private fields */ }Expand description
Passed from the runtime to provide access to the Durable Object’s storage as well as various metadata about the Object.
Implementations§
source§impl State
impl State
sourcepub fn id(&self) -> ObjectId<'_>
pub fn id(&self) -> ObjectId<'_>
The ID of this Durable Object which can be converted into a hex string using its to_string()
method.
sourcepub fn storage(&self) -> Storage
pub fn storage(&self) -> Storage
Contains methods for accessing persistent storage via the transactional storage API. See Transactional Storage API for a detailed reference.
pub fn _inner(self) -> DurableObjectState
Trait Implementations§
source§impl From<DurableObjectState> for State
impl From<DurableObjectState> for State
source§fn from(o: DurableObjectState) -> Self
fn from(o: DurableObjectState) -> Self
Converts to this type from the input type.