Skip to main content

FederationServer

Struct FederationServer 

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

Server-side authority that publishes one federation’s signed settings.

The server owns policy publication only. Applications still decide how a client authenticates this authority key and how the signed bytes are carried to clients. The server is not a signaling relay and does not participate in a peer’s WebRTC or CFR state machine.

Implementations§

Source§

impl FederationServer

Source

pub fn new( federation: FederationId, signer: SigningIdentity, ) -> Result<Self, Error>

Creates an empty epoch-zero configuration with the supplied authority identity.

Source

pub fn authority(&self) -> EndpointIdentity

Returns the pinned authority identity clients must authenticate out of band.

Source

pub fn federation(&self) -> FederationId

Returns the currently configured federation namespace.

Source

pub fn epoch(&self) -> u64

Returns the current monotonic policy version.

Source

pub fn replace_members( &mut self, epoch: u64, members: Vec<FederationMember>, ) -> Result<(), Error>

Replaces all explicit member bindings at a strictly newer epoch.

An application must apply its admission and identity policy before calling this method. In particular, an FCP endpoint identity and CFR identity key are not considered equivalent simply because this server publishes them in one record.

Source

pub fn publish(&self) -> Result<SignedFederationConfiguration, Error>

Produces the canonical signed configuration artifact for application-selected delivery.

Auto Trait Implementations§

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> 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, 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.