pub enum RpcServerMode {
Loopback {
bind: SocketAddr,
},
PublicRead {
bind: SocketAddr,
tls: TlsConfig,
},
Peer {
bind: SocketAddr,
tls: TlsConfig,
},
}Expand description
How a server is deployed — surface + bind address + (for TLS surfaces) certs.
Variants§
Loopback
Plain HTTP on loopback; the full control surface. MUST bind a loopback
address (enforced by RpcServer::serve).
Fields
§
bind: SocketAddrThe loopback bind address.
PublicRead
HTTPS public read surface — PublicRead tier only.
Fields
§
bind: SocketAddrThe bind address.
Peer
mTLS peer surface — the peer allowlist only.
Fields
§
bind: SocketAddrThe bind address.
Implementations§
Source§impl RpcServerMode
impl RpcServerMode
Sourcepub fn loopback(bind: SocketAddr) -> Self
pub fn loopback(bind: SocketAddr) -> Self
A loopback control server.
Sourcepub fn bind(&self) -> SocketAddr
pub fn bind(&self) -> SocketAddr
The bind address.
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 (const: unstable) · 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 !RefUnwindSafe for RpcServerMode
impl !UnwindSafe for RpcServerMode
impl Freeze for RpcServerMode
impl Send for RpcServerMode
impl Sync for RpcServerMode
impl Unpin for RpcServerMode
impl UnsafeUnpin 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