Struct ruserf_types::NodeId
source · pub struct NodeId(/* private fields */);Expand description
A unique string identifying a server for all time. The maximum length of an id is 512 bytes.
Implementations§
Trait Implementations§
source§impl CheapClone for NodeId
impl CheapClone for NodeId
source§fn cheap_clone(&self) -> Self
fn cheap_clone(&self) -> Self
Returns a copy of the value.
source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for NodeId
impl Ord for NodeId
source§impl PartialEq for NodeId
impl PartialEq for NodeId
source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for NodeId
impl Serialize for NodeId
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
source§impl Transformable for NodeId
impl Transformable for NodeId
§type Error = NodeIdTransformError
type Error = NodeIdTransformError
The error type returned when encoding or decoding fails.
source§fn encode(
&self,
dst: &mut [u8]
) -> Result<usize, <NodeId as Transformable>::Error>
fn encode( &self, dst: &mut [u8] ) -> Result<usize, <NodeId as Transformable>::Error>
Encodes the value into the given buffer for transmission. Read more
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the value.
This is used to pre-allocate a buffer for encoding.
impl Eq for NodeId
impl Id for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T> Decodable for Twhere
T: Transformable,
impl<T> Decodable for Twhere
T: Transformable,
§type Error = <T as Transformable>::Error
type Error = <T as Transformable>::Error
The error type returned when encoding or decoding fails.
source§fn decode(src: &[u8]) -> Result<(usize, T), <T as Decodable>::Error>
fn decode(src: &[u8]) -> Result<(usize, T), <T as Decodable>::Error>
Decodes the value from the given buffer received over the wire. Read more
source§impl<T> Encodable for Twhere
T: Transformable,
impl<T> Encodable for Twhere
T: Transformable,
§type Error = <T as Transformable>::Error
type Error = <T as Transformable>::Error
The error type returned when encoding or decoding fails.
source§fn encode(&self, dst: &mut [u8]) -> Result<usize, <T as Encodable>::Error>
fn encode(&self, dst: &mut [u8]) -> Result<usize, <T as Encodable>::Error>
Encodes the value into the given buffer for transmission. Read more
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the value.
This is used to pre-allocate a buffer for encoding.
source§fn encode_to_vec(&self) -> Result<Vec<u8>, <T as Encodable>::Error>
fn encode_to_vec(&self) -> Result<Vec<u8>, <T as Encodable>::Error>
Encodes the value into a vec for transmission.
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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