pub struct RegionId(/* private fields */);Expand description
A unique identifier for a region in the runtime.
Regions form a tree structure and own all work spawned within them.
Implementations§
Source§impl RegionId
impl RegionId
Sourcepub const fn from_arena(index: ArenaIndex) -> RegionId
pub const fn from_arena(index: ArenaIndex) -> RegionId
Creates a new region ID from an arena index (internal use).
Sourcepub const fn arena_index(self) -> ArenaIndex
pub const fn arena_index(self) -> ArenaIndex
Returns the underlying arena index (internal use).
Sourcepub fn new_ephemeral() -> RegionId
pub fn new_ephemeral() -> RegionId
Creates a new ephemeral region ID for request-scoped contexts created outside the runtime scheduler.
This is intended for production request handling that needs unique identifiers without full runtime region registration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RegionId
impl<'de> Deserialize<'de> for RegionId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RegionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RegionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for RegionId
impl Ord for RegionId
Source§impl PartialOrd for RegionId
impl PartialOrd for RegionId
Source§impl Serialize for RegionId
impl Serialize for RegionId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RegionId
impl Eq for RegionId
impl StructuralPartialEq for RegionId
Auto Trait Implementations§
impl Freeze for RegionId
impl RefUnwindSafe for RegionId
impl Send for RegionId
impl Sync for RegionId
impl Unpin for RegionId
impl UnwindSafe for RegionId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ModelDump for Twhere
T: Serialize,
impl<T> ModelDump for Twhere
T: Serialize,
Source§fn model_dump(&self, options: DumpOptions) -> Result<Value, Error>
fn model_dump(&self, options: DumpOptions) -> Result<Value, Error>
Serialize a model to a JSON value. Read more
Source§fn model_dump_json(&self) -> Result<String, Error>
fn model_dump_json(&self) -> Result<String, Error>
Serialize a model to a JSON string with default options.
Source§fn model_dump_json_pretty(&self) -> Result<String, Error>
fn model_dump_json_pretty(&self) -> Result<String, Error>
Serialize a model to a pretty-printed JSON string.
Source§fn model_dump_json_with_options(
&self,
options: DumpOptions,
) -> Result<String, Error>
fn model_dump_json_with_options( &self, options: DumpOptions, ) -> Result<String, Error>
Serialize a model to a JSON string with full options support. Read more
Source§impl<T> ModelValidate for Twhere
T: DeserializeOwned,
impl<T> ModelValidate for Twhere
T: DeserializeOwned,
Source§fn model_validate(
input: impl Into<ValidateInput>,
options: ValidateOptions,
) -> Result<T, ValidationError>
fn model_validate( input: impl Into<ValidateInput>, options: ValidateOptions, ) -> Result<T, ValidationError>
Create and validate a model from input. Read more
Source§fn model_validate_json(json: &str) -> ValidateResult<Self>
fn model_validate_json(json: &str) -> ValidateResult<Self>
Create and validate a model from JSON string with default options.
Source§fn model_validate_dict(dict: HashMap<String, Value>) -> ValidateResult<Self>
fn model_validate_dict(dict: HashMap<String, Value>) -> ValidateResult<Self>
Create and validate a model from a HashMap with default options.