pub struct EP { /* private fields */ }Expand description
EP stands for End Point.
It contains all the informations required to, typically, contact a node. It’s composed of a Key and a URL. Neither the Key or the URL could be enough. Obviously, when you only have the Key, you don’t know where to call the node. And if you only have the URL, you still need the Key because a given URL might respond for several different virtual nodes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EP
impl<'de> Deserialize<'de> for EP
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 EP
impl Display for EP
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Pretty-print an endpoint.
§Examples
use confitul::EP;
let e = EP::parse("12345678ffffffff01234567fffffffff00123456ffffffff0012345ffffffff","http://just-a-test.com").unwrap();
assert_eq!("{\"key\":\"0.071111111\",\"url\":\"http://just-a-test.com/\"}", format!("{}", e));impl Eq for EP
impl StructuralPartialEq for EP
Auto Trait Implementations§
impl Freeze for EP
impl RefUnwindSafe for EP
impl Send for EP
impl Sync for EP
impl Unpin for EP
impl UnwindSafe for EP
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