Skip to main content

OrderedEndpoint

Struct OrderedEndpoint 

Source
pub struct OrderedEndpoint<'a> { /* private fields */ }

Implementations§

Source§

impl OrderedEndpoint<'_>

Source

pub fn prepare_standby_configuration( &mut self, request: Uuid, candidate: &SignedOwnerCandidate, peer: (&str, &[u8]), now: u64, ) -> Result<ConfigurationPreparation>

Create only a configuration stream. Until its grant is installed it is unavailable to the dispatcher and cannot send application traffic.

Source

pub fn install_standby_configuration( &mut self, request: Uuid, grant: &SignedConfigurationGrant, now: u64, ) -> Result<ConfigurationInvitation>

Install the old owner’s authorization without activating the candidate. Exact installed retries need neither a fresh candidate nor a fresh lease.

Source§

impl OrderedEndpoint<'_>

Source

pub fn configuration_streams( &mut self, now: u64, ) -> Result<Vec<ConfigurationStream>>

Only established, still-authorized configuration streams are eligible. Expiry alone does not hide the recovery route; known revocation does.

Source

pub fn authority_state(&self) -> Result<VerifiedState>

Source

pub fn create_configuration( &mut self, owner: &OwnerKey, request: Uuid, peer: (&str, &[u8]), now: u64, ) -> Result<ConfigurationInvitation>

Grants full configuration access to one trusted daemon. Both node keys and the exact initial checkpoint are signed by the separate owner key.

Source

pub fn join_configuration( &mut self, invitation: &ConfigurationInvitation, now: u64, ) -> Result<()>

Source

pub fn next_configuration( &mut self, group: &[u8], request: Uuid, now: u64, ) -> Result<Option<Packet>>

Publish the next bounded fragment of already accepted owner history. Applying a new local signed revision and its history is a separate owner transaction; this outbox then catches every configured peer up to it.

Source

pub fn rotate_configuration( &mut self, group: &[u8], request: Uuid, now: u64, ) -> Result<Packet>

Source

pub fn stage_configuration( &mut self, packet: &Packet, now: u64, ) -> Result<Staged>

Source

pub fn drain_configuration( &mut self, group: &[u8], limit: usize, now: u64, ) -> Result<Vec<Received>>

Source

pub fn configuration_status( &mut self, group: &[u8], now: u64, ) -> Result<StreamStatus>

Source

pub fn configuration_outbox( &mut self, group: &[u8], after: Option<u64>, limit: usize, now: u64, ) -> Result<Vec<Packet>>

Source§

impl OrderedEndpoint<'_>

Source

pub fn receipt(&mut self, group: &[u8], now: u64) -> Result<Receipt>

Sign only a committed stream head, including durably buffered plaintext or configuration fragments. This does not acknowledge chat execution.

Source

pub fn confirm( &mut self, receipt: &Receipt, reader: &str, now: u64, ) -> Result<()>

reader comes from the caller’s independently pinned link or owner grant.

Source

pub fn confirmed_next(&self, group: &[u8]) -> Result<u64>

Source

pub fn confirmed_receipt( &mut self, group: &[u8], now: u64, ) -> Result<Option<Receipt>>

Return only a previously verified checkpoint, rechecking current peer authority before transport can use it to restore a relay’s missing floor.

Source§

impl OrderedEndpoint<'_>

Source

pub fn storage_status(&self) -> Result<Value>

Source

pub fn clean_storage(&mut self, dry_run: bool) -> Result<Value>

Source§

impl<'a> OrderedEndpoint<'a>

Source

pub fn open(home: &Path, identity: &'a NodeIdentity) -> Result<Self>

Source

pub fn open_runtime(home: &Path, identity: &'a NodeIdentity) -> Result<Self>

Attach trusted daemon code to the live RPC database. Configuration reception and RPC permission checks then share one authority checkpoint.

Source

pub fn initialize(&mut self, state: &VerifiedState, now: u64) -> Result<()>

Source

pub fn apply_authority(&mut self, updates: &[SignedState]) -> Result<()>

Source

pub fn key_package(&mut self, request: Uuid, now: u64) -> Result<Vec<u8>>

Source

pub fn create( &mut self, request: Uuid, peers: &[(&str, &[u8])], now: u64, ) -> Result<Packet>

Source

pub fn join( &mut self, packet: &Packet, writer: &str, expected: &[&str], now: u64, ) -> Result<()>

Writer and roster must be independently approved locally. The outer packet signature and MLS Welcome creator must both authenticate that writer.

Source

pub fn send( &mut self, group: &[u8], id: Uuid, body: &[u8], now: u64, ) -> Result<Packet>

Source

pub fn rotate(&mut self, group: &[u8], id: Uuid, now: u64) -> Result<Packet>

Source

pub fn remove_revoked( &mut self, group: &[u8], id: Uuid, now: u64, ) -> Result<Packet>

Source

pub fn stage(&mut self, packet: &Packet, now: u64) -> Result<Staged>

Verify before buffering, including writer authority. No MLS keys advance here. Duplicate and conflicting sequence slots cannot overwrite each other.

Source

pub fn drain( &mut self, group: &[u8], limit: usize, now: u64, ) -> Result<Vec<Received>>

Apply at most limit contiguous packets. Each packet commits separately: a later invalid packet cannot roll back earlier accepted work. Errors leave the failing packet queued for diagnosis, never skip an authenticated gap.

Source

pub fn status(&mut self, group: &[u8], now: u64) -> Result<StreamStatus>

Source

pub fn outbox( &mut self, group: &[u8], after: Option<u64>, limit: usize, now: u64, ) -> Result<Vec<Packet>>

Durable ciphertext packets; None includes the origin. Recipient transport authorization and encrypted acknowledgments remain a separate concern.

Source

pub fn inbox( &self, group: &[u8], after: i64, limit: usize, ) -> Result<Vec<(i64, InboxMessage)>>

Trusted endpoint inspection. Chat-level delivery still needs its policy check.

Auto Trait Implementations§

§

impl<'a> !Freeze for OrderedEndpoint<'a>

§

impl<'a> !RefUnwindSafe for OrderedEndpoint<'a>

§

impl<'a> !Sync for OrderedEndpoint<'a>

§

impl<'a> !UnwindSafe for OrderedEndpoint<'a>

§

impl<'a> Forget for OrderedEndpoint<'a>

§

impl<'a> Move for OrderedEndpoint<'a>

§

impl<'a> Send for OrderedEndpoint<'a>

§

impl<'a> Unpin for OrderedEndpoint<'a>
where *mut sqlite3: Unpin, Arc<Mutex<*mut sqlite3>>: Unpin, *const u8 is !null: Unpin, *const Node<Arc<str>, RawStatement> is !null: Unpin, &'a NodeIdentity: Unpin,

§

impl<'a> UnsafeUnpin for OrderedEndpoint<'a>
where *mut sqlite3: UnsafeUnpin, *const ArcInner<Mutex<*mut sqlite3>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<*mut sqlite3>>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<NonNull<Node<Arc<str>, RawStatement>>>: UnsafeUnpin, *const Node<Arc<str>, RawStatement> is !null: UnsafeUnpin, &'a NodeIdentity: UnsafeUnpin,

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more