pub enum RpcServerMode {
Internal {
bind: SocketAddr,
tls: TlsConfig,
role_map: Arc<RoleMap>,
},
Public {
bind: SocketAddr,
tls: TlsConfig,
},
PlainText {
bind: SocketAddr,
},
}Expand description
Server deployment mode.
Variants§
Internal
Internal mTLS server: private CA, full method surface.
Fields
§
bind: SocketAddrBind address.
Public
Public HTTPS server: public CA, read-only subset.
PlainText
Plain-text HTTP (no TLS). Intended for localhost-only dev / testing. DO NOT use in production.
Fields
§
bind: SocketAddrBind address.
Implementations§
Source§impl RpcServerMode
impl RpcServerMode
Sourcepub fn public_plaintext(bind: SocketAddr) -> Self
pub fn public_plaintext(bind: SocketAddr) -> Self
Convenience constructor for a plain-text dev mode (loopback only).
Sourcepub fn bind(&self) -> SocketAddr
pub fn bind(&self) -> SocketAddr
The bind address regardless of mode.
Trait Implementations§
Source§impl Clone for RpcServerMode
impl Clone for RpcServerMode
Source§fn clone(&self) -> RpcServerMode
fn clone(&self) -> RpcServerMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RpcServerMode
impl !RefUnwindSafe for RpcServerMode
impl Send for RpcServerMode
impl Sync for RpcServerMode
impl Unpin for RpcServerMode
impl UnsafeUnpin for RpcServerMode
impl !UnwindSafe for RpcServerMode
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
Mutably borrows from an owned value. Read more