pub struct WebSocketUrl { /* private fields */ }Expand description
URL endpoint struct for WebSocket endpoints with validation.
Implementations§
Source§impl WebSocketUrl
impl WebSocketUrl
Sourcepub fn new(url: &str) -> Result<Self, FeagiNetworkError>
pub fn new(url: &str) -> Result<Self, FeagiNetworkError>
Creates a new WebSocketUrl after validating the format.
The URL will be normalized to include the ws:// or wss:// scheme if not present.
§Arguments
url- The WebSocket URL (e.g., “ws://localhost:8080”, “wss://example.com/path”, “localhost:8080”).
§Errors
Returns an error if the URL format is invalid.
Trait Implementations§
Source§impl Clone for WebSocketUrl
impl Clone for WebSocketUrl
Source§fn clone(&self) -> WebSocketUrl
fn clone(&self) -> WebSocketUrl
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 moreSource§impl Debug for WebSocketUrl
impl Debug for WebSocketUrl
Source§impl<'de> Deserialize<'de> for WebSocketUrl
impl<'de> Deserialize<'de> for WebSocketUrl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for WebSocketUrl
impl Display for WebSocketUrl
Source§impl PartialEq for WebSocketUrl
impl PartialEq for WebSocketUrl
Source§impl Serialize for WebSocketUrl
impl Serialize for WebSocketUrl
impl StructuralPartialEq for WebSocketUrl
Auto Trait Implementations§
impl Freeze for WebSocketUrl
impl RefUnwindSafe for WebSocketUrl
impl Send for WebSocketUrl
impl Sync for WebSocketUrl
impl Unpin for WebSocketUrl
impl UnsafeUnpin for WebSocketUrl
impl UnwindSafe for WebSocketUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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