pub struct EndPoint { /* private fields */ }Expand description
A string that respects the EndPoint canon form: <locator>[#<config>].
<locator> is a valid Locator and <config> is of the form
<key1>=<value1>;...;<keyN>=<valueN> where keys are alphabetically sorted. <config> is
optional and can be provided to configure some aspects for an EndPoint, e.g. the interface
to listen on or connect to.
A full EndPoint string is hence in the form of <proto>/<address>[?<metadata>][#config].
§Metadata
-
prio: a priority range bounded inclusively below and above (e.g.2-4signifies priorities 2, 3 and 4). This value is used to select the link used for transmission based on the Priority of the message in question.For example,
tcp/localhost:7447?prio=1-3assigns prioritiesPriority::RealTime, Priority::InteractiveHigh andPriority::InteractiveLowto the established link. -
rel: either “0” forReliability::BestEffortor “1” forReliability::Reliable. This value is used to select the link used for transmission based on the reliability of the message in question.For example,
tcp/localhost:7447?prio=6-7;rel=0assigns prioritiesPriority::DataLowand Priority::Background, andReliability::BestEffortto the established link.
Implementations§
Source§impl EndPoint
impl EndPoint
pub fn new<A, B, C, D>( protocol: A, address: B, metadata: C, config: D, ) -> ZResult<Self>
pub fn as_str(&self) -> &str
pub fn split(&self) -> (Protocol<'_>, Address<'_>, Metadata<'_>, Config<'_>)
pub fn protocol(&self) -> Protocol<'_>
pub fn protocol_mut(&mut self) -> ProtocolMut<'_>
pub fn address(&self) -> Address<'_>
pub fn address_mut(&mut self) -> AddressMut<'_>
pub fn metadata(&self) -> Metadata<'_>
pub fn metadata_mut(&mut self) -> MetadataMut<'_>
pub fn config(&self) -> Config<'_>
pub fn config_mut(&mut self) -> ConfigMut<'_>
pub fn to_locator(&self) -> Locator
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EndPoint
impl<'de> Deserialize<'de> for EndPoint
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>,
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 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
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§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>
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>
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