pub struct Endpoint { /* private fields */ }Expand description
Validated plaintext-loopback, authenticated-root TLS, or WSS endpoint.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Resolves MOBIUS_GATEWAY_ENDPOINT, defaulting to local plaintext.
§Errors
Returns an error if the input cannot be parsed or validated.
Sourcepub const fn is_plaintext(&self) -> bool
pub const fn is_plaintext(&self) -> bool
Returns whether this endpoint uses loopback-only plaintext transport.
Sourcepub const fn is_websocket(&self) -> bool
pub const fn is_websocket(&self) -> bool
Returns whether this endpoint uses secure WebSocket transport.
Sourcepub fn with_websocket_bearer(self, token: &str) -> Result<Self>
pub fn with_websocket_bearer(self, token: &str) -> Result<Self>
Adds a bearer credential to the secure WebSocket upgrade only. The caller must verify that this endpoint is trusted to receive the credential. Gateway protocol authentication remains separate.
§Errors
Returns an error for other transports or an invalid bearer credential.
Trait Implementations§
impl Eq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl !Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpoint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.