pub struct Endpoint {
pub transport: TransportTag,
pub address: String,
}Expand description
Identifies where a consumer should connect to read a feed.
address is interpreted in a transport-specific way:
Tcp,Quic-"host:port"WebSocket,WebTransport- full URL, e.g."wss://host:port/path"Uds- filesystem pathStdio- empty
Fields§
§transport: TransportTag§address: StringImplementations§
Source§impl Endpoint
impl Endpoint
pub fn new(transport: TransportTag, address: impl Into<String>) -> Endpoint
pub fn tcp(address: impl Into<String>) -> Endpoint
pub fn websocket(url: impl Into<String>) -> Endpoint
pub fn quic(address: impl Into<String>) -> Endpoint
pub fn uds(path: impl Into<String>) -> Endpoint
pub fn webtransport(url: impl Into<String>) -> Endpoint
pub fn stdio() -> Endpoint
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Endpoint
impl<'de> Deserialize<'de> for Endpoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Endpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Endpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Endpoint
impl Serialize for Endpoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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