pub struct ServerConfiguration {
pub identifier: String,
pub server_version: String,
pub min_libxmtp_version: String,
pub auth: AuthConfiguration,
pub retention: RetentionConfiguration,
pub limits: LimitsConfiguration,
pub mls: MlsConfiguration,
pub smart_contract_wallet_chains: Vec<String>,
}Expand description
One immutable snapshot of what a deployment published.
Default is the compiled fallback used before any fetch succeeds, and for
any field the deployment left at zero.
Fields§
§identifier: StringStable operator-chosen name. Empty only before a first fetch succeeds.
server_version: String§min_libxmtp_version: StringEmpty when the operator published no minimum.
auth: AuthConfiguration§retention: RetentionConfiguration§limits: LimitsConfiguration§mls: MlsConfiguration§smart_contract_wallet_chains: Vec<String>CAIP-2 chain ids this deployment verifies smart contract wallet signatures on. Empty rejects every app-supplied signature.
Implementations§
Source§impl ServerConfiguration
impl ServerConfiguration
Sourcepub fn validate(&self) -> Result<(), ServerConfigurationError>
pub fn validate(&self) -> Result<(), ServerConfigurationError>
Apply the rules of CFG-044: the identifier must be well formed, any minimum version must parse, every chain must be CAIP-2, and every numeric value must survive the trip to an SDK integer intact.
Sourcepub fn minimum_version(
&self,
) -> Result<Option<Version>, ServerConfigurationError>
pub fn minimum_version( &self, ) -> Result<Option<Version>, ServerConfigurationError>
The published minimum, parsed. None admits every client version.
Sourcepub fn accepts_chain(&self, chain: &str) -> bool
pub fn accepts_chain(&self, chain: &str) -> bool
Whether this deployment accepts a smart contract wallet signature on
chain. An empty list accepts none.
Trait Implementations§
Source§impl Clone for ServerConfiguration
impl Clone for ServerConfiguration
Source§fn clone(&self) -> ServerConfiguration
fn clone(&self) -> ServerConfiguration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerConfiguration
impl Debug for ServerConfiguration
Source§impl Default for ServerConfiguration
impl Default for ServerConfiguration
Source§fn default() -> ServerConfiguration
fn default() -> ServerConfiguration
Source§impl PartialEq for ServerConfiguration
impl PartialEq for ServerConfiguration
Source§fn eq(&self, other: &ServerConfiguration) -> bool
fn eq(&self, other: &ServerConfiguration) -> bool
self and other values to be equal, and is used by ==.impl Eq for ServerConfiguration
impl StructuralPartialEq for ServerConfiguration
Auto Trait Implementations§
impl Freeze for ServerConfiguration
impl RefUnwindSafe for ServerConfiguration
impl Send for ServerConfiguration
impl Sync for ServerConfiguration
impl Unpin for ServerConfiguration
impl UnsafeUnpin for ServerConfiguration
impl UnwindSafe for ServerConfiguration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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