pub struct ConnectionId(/* private fields */);Expand description
Local logical transport attachment identity for one connection scope.
Implementations§
Source§impl ConnectionId
impl ConnectionId
Sourcepub fn new(value: impl Into<String>) -> ConnectionId
pub fn new(value: impl Into<String>) -> ConnectionId
Create a connection id from an explicit caller-supplied string.
§Panics
Panics if value fails identity validation. Prefer Self::try_new.
Sourcepub fn try_new(value: impl Into<String>) -> Result<ConnectionId, IdentityError>
pub fn try_new(value: impl Into<String>) -> Result<ConnectionId, IdentityError>
Fallible constructor.
Sourcepub fn generate() -> ConnectionId
pub fn generate() -> ConnectionId
Allocate a random connection id (for tests and callers without an injector).
Trait Implementations§
Source§impl Clone for ConnectionId
impl Clone for ConnectionId
Source§fn clone(&self) -> ConnectionId
fn clone(&self) -> ConnectionId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConnectionId
impl Debug for ConnectionId
Source§impl<'de> Deserialize<'de> for ConnectionId
impl<'de> Deserialize<'de> for ConnectionId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConnectionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConnectionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ConnectionId
impl Display for ConnectionId
impl Eq for ConnectionId
Source§impl Hash for ConnectionId
impl Hash for ConnectionId
Source§impl PartialEq for ConnectionId
impl PartialEq for ConnectionId
Source§impl Serialize for ConnectionId
impl Serialize for ConnectionId
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 ConnectionId
Auto Trait Implementations§
impl Freeze for ConnectionId
impl RefUnwindSafe for ConnectionId
impl Send for ConnectionId
impl Sync for ConnectionId
impl Unpin for ConnectionId
impl UnsafeUnpin for ConnectionId
impl UnwindSafe for ConnectionId
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