pub struct StreamPartId(/* private fields */);Expand description
Opaque accumulation key of one streamed part.
Eq + Hash + Clone + Debug and nothing else — deliberately no
Serialize/Deserialize, no rendering, and no public accessor into
the durable id space (crate-internal legacy-fallback sites read
StreamPartId::wire_str; the identity_leak compile-fail suite pins
the public boundary). Keys derived from wire ids (StreamPartId::Wire)
stay distinguishable from minted ones because the accumulator’s
interleaving-boundary lifecycle still asks
StreamPartId::is_minted; that discriminant is stream-internal
bookkeeping, not provenance a serializer may consult.
The representation is private: outside the crate, pattern-matching
cannot extract the wire string (or any other payload), so the public
surface’s opacity is a property of the type, not a convention.
Construction goes through StreamPartId::wire and
StreamPartId::minted / MintKind::for_wire_index.
Implementations§
Source§impl StreamPartId
impl StreamPartId
Sourcepub fn wire(id: impl Into<String>) -> StreamPartId
pub fn wire(id: impl Into<String>) -> StreamPartId
A key derived from a wire-supplied identifier.
Sourcepub const fn minted(kind: MintKind, index: u64) -> StreamPartId
pub const fn minted(kind: MintKind, index: u64) -> StreamPartId
A key minted at a stream boundary because the wire supplied none.
const so per-stream constant keys can live in const items.
Trait Implementations§
Source§impl Clone for StreamPartId
impl Clone for StreamPartId
Source§fn clone(&self) -> StreamPartId
fn clone(&self) -> StreamPartId
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamPartId
impl Debug for StreamPartId
impl Eq for StreamPartId
Source§impl From<&str> for StreamPartId
impl From<&str> for StreamPartId
Source§fn from(id: &str) -> StreamPartId
fn from(id: &str) -> StreamPartId
Source§impl From<String> for StreamPartId
A bare string is by definition a wire-derived key — fabricating a
StreamPartId::Minted requires naming a MintKind explicitly
(normally via SyntheticIds), so no conversion can launder a
fabricated key into the wire-derived space. The empty string converts
too — as a key that is harmless (it can collide only with itself
within one stream) — but it carries no durable handle: WireId
construction is separate and rejects emptiness.
impl From<String> for StreamPartId
A bare string is by definition a wire-derived key — fabricating a
StreamPartId::Minted requires naming a MintKind explicitly
(normally via SyntheticIds), so no conversion can launder a
fabricated key into the wire-derived space. The empty string converts
too — as a key that is harmless (it can collide only with itself
within one stream) — but it carries no durable handle: WireId
construction is separate and rejects emptiness.
Source§fn from(id: String) -> StreamPartId
fn from(id: String) -> StreamPartId
Source§impl Hash for StreamPartId
impl Hash for StreamPartId
Source§impl PartialEq for StreamPartId
impl PartialEq for StreamPartId
impl StructuralPartialEq for StreamPartId
Auto Trait Implementations§
impl Freeze for StreamPartId
impl RefUnwindSafe for StreamPartId
impl Send for StreamPartId
impl Sync for StreamPartId
impl Unpin for StreamPartId
impl UnsafeUnpin for StreamPartId
impl UnwindSafe for StreamPartId
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
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§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.