Skip to main content

MaterializedPositions

Struct MaterializedPositions 

Source
pub struct MaterializedPositions { /* private fields */ }
Expand description

Trait for an append-only message store with G-Set CRDT semantics (REQ-300). Trait for an append-only message store with G-Set CRDT semantics (REQ-300). Trait for an append-only message store with G-Set CRDT semantics (REQ-300). Native-computed position cache. Facts have private fields and no deserialize implementation. This is an accepted-evidence port, not authentication itself.

Implementations§

Source§

impl MaterializedPositions

Source

pub fn new( context: PositionContext, protocol: Option<&CausalProtocol>, ) -> Result<Self, String>

Source

pub fn context(&self) -> &PositionContext

Source

pub fn protocol(&self) -> Option<&CausalProtocol>

Source

pub fn metadata(&self) -> impl DoubleEndedIterator<Item = &PositionMetadata>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn contains(&self, id: &str) -> bool

Source

pub fn progress(&self, verb: &str) -> usize

Source

pub fn apply_accepted(&mut self, message: &Message) -> Result<(), String>

Called after native signature/context/admission checks. Requires exact native identity and thread, and computes positions with the native R5 evaluator. No full message is retained.

Source

pub fn apply_accepted_with_id( &mut self, message: &Message, id: String, ) -> Result<(), String>

Apply an accepted message under its authenticated state identity. This differs from the simple-message hash only for sealed role roots.

Source

pub fn restore_attested( context: PositionContext, protocol: Option<&CausalProtocol>, records: Vec<PositionMetadata>, ) -> Result<Self, String>

Restore externally authenticated accepted metadata, never arbitrary claimed positions. Hosts must verify snapshot truth/scope before calling; checkpoint’s safe wrapper performs that verification. Native relation is recomputed here, so even an attested rank cannot override R5.

Trait Implementations§

Source§

impl Clone for MaterializedPositions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MaterializedPositions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MaterializedPositions

Source§

impl PartialEq for MaterializedPositions

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MaterializedPositions

Auto Trait Implementations§

§

impl Forget for MaterializedPositions

§

impl Freeze for MaterializedPositions
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<CausalProtocol> is !null: Freeze, PhantomData<ArcInner<CausalProtocol>>: Freeze, *const ArcInner<PositionNode> is !null: Freeze, PhantomData<ArcInner<PositionNode>>: Freeze, *const ArcInner<BTreeMap<String, BTreeMap<String, usize>>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<String, BTreeMap<String, usize>>>>: Freeze, *const LeafNode<String, usize> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, usize)>>: Freeze,

§

impl Move for MaterializedPositions

§

impl RefUnwindSafe for MaterializedPositions

§

impl Send for MaterializedPositions
where RawVecInner: Send, Arc<CausalProtocol>: Send, Arc<PositionNode>: Send, Arc<BTreeMap<String, BTreeMap<String, usize>>>: Send, NodeRef<Owned, String, usize, LeafOrInternal>: Send, BoxRaw<(String, usize)>: Send,

§

impl Sync for MaterializedPositions
where RawVecInner: Sync, Arc<CausalProtocol>: Sync, Arc<PositionNode>: Sync, Arc<BTreeMap<String, BTreeMap<String, usize>>>: Sync, NodeRef<Owned, String, usize, LeafOrInternal>: Sync, BoxRaw<(String, usize)>: Sync,

§

impl Unpin for MaterializedPositions
where *const u8 is !null: Unpin, Arc<CausalProtocol>: Unpin, Arc<PositionNode>: Unpin, Arc<BTreeMap<String, BTreeMap<String, usize>>>: Unpin, *const LeafNode<String, usize> is !null: Unpin, Box<(String, usize)>: Unpin,

§

impl UnsafeUnpin for MaterializedPositions
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<CausalProtocol> is !null: UnsafeUnpin, PhantomData<ArcInner<CausalProtocol>>: UnsafeUnpin, *const ArcInner<PositionNode> is !null: UnsafeUnpin, PhantomData<ArcInner<PositionNode>>: UnsafeUnpin, *const ArcInner<BTreeMap<String, BTreeMap<String, usize>>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<String, BTreeMap<String, usize>>>>: UnsafeUnpin, *const LeafNode<String, usize> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, usize)>>: UnsafeUnpin,

§

impl UnwindSafe for MaterializedPositions

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.