pub struct PlainPublisher<'a, 's> { /* private fields */ }Implementations§
Source§impl PlainPublisher<'_, '_>
impl PlainPublisher<'_, '_>
pub fn emit_context_page( &mut self, page: usize, out: &mut [u8], framing: &mut [u8], sink: impl FnMut(&[u8], PageRef) -> Result<(), DescriptorError>, ) -> Result<usize, DescriptorError>
Sourcepub fn encode_context_root(
&mut self,
out: &mut [u8],
framing: &mut [u8],
) -> Result<usize, DescriptorError>
pub fn encode_context_root( &mut self, out: &mut [u8], framing: &mut [u8], ) -> Result<usize, DescriptorError>
Idempotent encoding of the fixed completed context; callbacks are not repeated.
Source§impl PlainPublisher<'_, '_>
impl PlainPublisher<'_, '_>
pub fn emit_entry_page( &mut self, page: usize, out: &mut [u8], framing: &mut [u8], observe: impl FnMut(u32, OutboardNode) -> Result<(), DescriptorError>, sink: impl FnMut(&[u8], PageRef) -> Result<(), DescriptorError>, ) -> Result<usize, DescriptorError>
Source§impl PlainPublisher<'_, '_>
impl PlainPublisher<'_, '_>
Sourcepub fn finish(
&mut self,
context_root: &[u8],
out: &mut [u8],
framing: &mut [u8],
) -> Result<CandidateIdentity, DescriptorError>
pub fn finish( &mut self, context_root: &[u8], out: &mut [u8], framing: &mut [u8], ) -> Result<CandidateIdentity, DescriptorError>
Re-encoding is idempotent and emits no sink callbacks. Output remains a disclosure candidate.
Sourcepub fn body_encoded_length(
&self,
context_root: &[u8],
) -> Result<usize, DescriptorError>
pub fn body_encoded_length( &self, context_root: &[u8], ) -> Result<usize, DescriptorError>
Canonical body length without a second encoding; useful after a successful finish.
Source§impl<'a, 's> PlainPublisher<'a, 's>
impl<'a, 's> PlainPublisher<'a, 's>
Sourcepub fn prepare(
source: &'a [u8],
limits: BundleReadLimits,
assignments: &'a [EntryAssignment],
options: PublisherOptions,
index_scratch: &mut [EntryScratch<'a>],
id_scratch: &mut [u32],
context_refs: &'s mut [PageRef],
entry_refs: &'s mut [PageRef],
) -> Result<Self, DescriptorError>
pub fn prepare( source: &'a [u8], limits: BundleReadLimits, assignments: &'a [EntryAssignment], options: PublisherOptions, index_scratch: &mut [EntryScratch<'a>], id_scratch: &mut [u32], context_refs: &'s mut [PageRef], entry_refs: &'s mut [PageRef], ) -> Result<Self, DescriptorError>
Prepare a structurally validated publication candidate. For mapped/external storage the caller must retain an immutable snapshot with writer exclusion for this publisher’s entire lifetime. A Rust slice alone does not establish exclusion against external writers. Page/outboard sinks stage candidates only: authority, disclosure policy and durable commit must succeed before public delivery or promotion.
pub fn page_count(&self) -> usize
pub fn entry_count(&self) -> usize
pub const fn is_poisoned(&self) -> bool
pub const fn context_id(&self) -> Option<StrongDigest>
pub const fn source_commit(&self) -> SourceCommit
pub const fn metadata_reserved_bytes(&self) -> usize
Auto Trait Implementations§
impl<'a, 's> !UnwindSafe for PlainPublisher<'a, 's>
impl<'a, 's> Freeze for PlainPublisher<'a, 's>
impl<'a, 's> RefUnwindSafe for PlainPublisher<'a, 's>
impl<'a, 's> Send for PlainPublisher<'a, 's>
impl<'a, 's> Sync for PlainPublisher<'a, 's>
impl<'a, 's> Unpin for PlainPublisher<'a, 's>
impl<'a, 's> UnsafeUnpin for PlainPublisher<'a, 's>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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