pub struct Publish<'a> { /* private fields */ }Expand description
One exclusive read-modify-write batch. Do not call methods on the owning
Spine while this guard lives: its mapping mutex is non-reentrant. Use the
guard’s read_* / write_* methods instead. Reads alone do not advance the
counter; the first write opens the window and commit/drop closes it.
This is not a rollback transaction. Unwinding closes the window around the partial update, so callers must not interpret a panic as an aborted batch.
Implementations§
Source§impl Publish<'_>
impl Publish<'_>
Sourcepub fn is_advisory(&self) -> bool
pub fn is_advisory(&self) -> bool
Whether this batch acquired cross-handle/process publisher exclusion.
pub fn read_superblock(&self) -> Option<Superblock>
Sourcepub fn write_superblock(&mut self, h: &Superblock)
pub fn write_superblock(&mut self, h: &Superblock)
Copy only the payload; the atomic counter is never overwritten.
pub fn read_stream(&self) -> StreamHeader
pub fn write_stream(&mut self, h: &StreamHeader)
pub fn read_hebbian(&self) -> HebbianHeader
pub fn write_hebbian(&mut self, h: &HebbianHeader)
pub fn read_attention(&self) -> AttentionHeader
pub fn write_attention(&mut self, h: &AttentionHeader)
pub fn read_emotion(&self) -> EmotionHeader
pub fn write_emotion(&mut self, h: &EmotionHeader)
pub fn read_resonance(&self) -> ResonanceHeader
pub fn write_resonance(&mut self, h: &ResonanceHeader)
pub fn read_graph(&self) -> GraphHeader
pub fn write_graph(&mut self, h: &GraphHeader)
pub fn read_cache(&self) -> CacheHeader
pub fn write_cache(&mut self, h: &CacheHeader)
pub fn read_archetype(&self) -> ArchetypeHeader
pub fn write_archetype(&mut self, h: &ArchetypeHeader)
pub fn read_mirror(&self) -> MirrorHeader
pub fn write_mirror(&mut self, h: &MirrorHeader)
pub fn read_merkle(&self) -> MerkleHeader
pub fn write_merkle(&mut self, h: &MerkleHeader)
pub fn read_meta(&self) -> MetaHeader
pub fn write_meta(&mut self, h: &MetaHeader)
Sourcepub fn tick_stream(
&mut self,
cycle: u64,
surprise: f32,
curiosity: f32,
predicted_hash: u64,
predicted_confidence: f32,
last_query_hash: u64,
last_query_ms: u64,
hebbian_total_energy: f64,
epoch_ms: i64,
)
pub fn tick_stream( &mut self, cycle: u64, surprise: f32, curiosity: f32, predicted_hash: u64, predicted_confidence: f32, last_query_hash: u64, last_query_ms: u64, hebbian_total_energy: f64, epoch_ms: i64, )
Update the stream and publish record using one caller-supplied time. The batch may update other headers before committing the same window.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Publish<'a>
impl<'a> !Send for Publish<'a>
impl<'a> !UnwindSafe for Publish<'a>
impl<'a> Freeze for Publish<'a>
impl<'a> Sync for Publish<'a>
impl<'a> Unpin for Publish<'a>
impl<'a> UnsafeUnpin for Publish<'a>
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
Converts
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> ⓘ
Converts
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