pub struct ProcedureId(/* private fields */);Implementations§
Source§impl ProcedureId
impl ProcedureId
Sourcepub const SYSTEM_RESERVED_START: u64
pub const SYSTEM_RESERVED_START: u64
Lower bound of the id band reserved for ephemeral (Native/Ffi/Wasm) procedures.
Persistent ids are strictly below this; ephemeral ids are at or above it.
The split is enforced by the persistent / ephemeral constructors.
Sourcepub const SYSTEM_CONFIG_SET: ProcedureId
pub const SYSTEM_CONFIG_SET: ProcedureId
Reserved id for the built-in system::config::set Native procedure.
Retained for backwards-compat references; ephemeral procedures now get
fresh ids from a per-boot counter starting at SYSTEM_RESERVED_START.
Sourcepub const fn persistent(id: u64) -> Self
pub const fn persistent(id: u64) -> Self
Construct a persistent procedure id. Panics if id >= SYSTEM_RESERVED_START
— that band is reserved for ephemeral (Native/Ffi/Wasm) procedures.
Sourcepub const fn ephemeral(id: u64) -> Self
pub const fn ephemeral(id: u64) -> Self
Construct an ephemeral procedure id. Panics if id < SYSTEM_RESERVED_START
— that band belongs to persistent procedures.
Sourcepub const fn from_raw(id: u64) -> Self
pub const fn from_raw(id: u64) -> Self
Construct a ProcedureId from a raw u64 without checking which band it
falls in. Use this only for decoding trusted bytes (storage rows, key scans,
deserialization) where the value has already been validated upstream.
Sourcepub const fn is_ephemeral(&self) -> bool
pub const fn is_ephemeral(&self) -> bool
Returns true if this id was allocated from the ephemeral band.
Trait Implementations§
Source§impl Clone for ProcedureId
impl Clone for ProcedureId
Source§fn clone(&self) -> ProcedureId
fn clone(&self) -> ProcedureId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcedureId
impl Debug for ProcedureId
Source§impl Deref for ProcedureId
impl Deref for ProcedureId
Source§impl<'de> Deserialize<'de> for ProcedureId
impl<'de> Deserialize<'de> for ProcedureId
Source§fn deserialize<D>(deserializer: D) -> Result<ProcedureId, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ProcedureId, D::Error>where
D: Deserializer<'de>,
Source§impl Display for ProcedureId
impl Display for ProcedureId
Source§impl From<ProcedureId> for u64
impl From<ProcedureId> for u64
Source§fn from(value: ProcedureId) -> Self
fn from(value: ProcedureId) -> Self
Source§impl Hash for ProcedureId
impl Hash for ProcedureId
Source§impl Ord for ProcedureId
impl Ord for ProcedureId
Source§fn cmp(&self, other: &ProcedureId) -> Ordering
fn cmp(&self, other: &ProcedureId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<u64> for ProcedureId
impl PartialEq<u64> for ProcedureId
Source§impl PartialEq for ProcedureId
impl PartialEq for ProcedureId
Source§impl PartialOrd for ProcedureId
impl PartialOrd for ProcedureId
Source§impl Serialize for ProcedureId
impl Serialize for ProcedureId
impl Copy for ProcedureId
impl Eq for ProcedureId
impl StructuralPartialEq for ProcedureId
Auto Trait Implementations§
impl Freeze for ProcedureId
impl RefUnwindSafe for ProcedureId
impl Send for ProcedureId
impl Sync for ProcedureId
impl Unpin for ProcedureId
impl UnsafeUnpin for ProcedureId
impl UnwindSafe for ProcedureId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more