Struct UserChannelId
#[repr(transparent)]pub struct UserChannelId(pub [u8; 16]);Expand description
A client-generated id that identifies a channel throughout its entire
lifecycle, including before the channel is confirmed on-chain and assigned
its ChannelId.
Tuple Fields§
§0: [u8; 16]Implementations§
§impl UserChannelId
impl UserChannelId
pub fn to_u128(self) -> u128
pub fn from_rng<R>(rng: &mut R) -> UserChannelIdwhere
R: RngCore,
pub fn derive_temporary_channel_id(&self) -> ChannelId
Trait Implementations§
§impl AsRef<[u8]> for UserChannelId
impl AsRef<[u8]> for UserChannelId
§impl AsRef<[u8; 16]> for UserChannelId
impl AsRef<[u8; 16]> for UserChannelId
§impl ByteArray<16> for UserChannelId
impl ByteArray<16> for UserChannelId
fn from_array(array: [u8; 16]) -> UserChannelId
fn to_array(&self) -> [u8; 16]
fn as_array(&self) -> &[u8; 16]
fn as_slice(&self) -> &[u8] ⓘ
fn to_vec(&self) -> Vec<u8> ⓘ
fn try_from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
fn try_from_vec(vec: Vec<u8>) -> Result<Self, TryFromSliceError>
fn from_hex(s: &str) -> Result<Self, DecodeError>
fn to_hex(&self) -> String
fn as_hex_display(&self) -> HexDisplay<'_>
fn fmt_as_hex(&self, f: &mut Formatter<'_>) -> Result<(), Error>
§impl Clone for UserChannelId
impl Clone for UserChannelId
§fn clone(&self) -> UserChannelId
fn clone(&self) -> UserChannelId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for UserChannelId
impl Debug for UserChannelId
§impl<'de> Deserialize<'de> for UserChannelId
impl<'de> Deserialize<'de> for UserChannelId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserChannelId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserChannelId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for UserChannelId
impl Display for UserChannelId
§impl From<u128> for UserChannelId
impl From<u128> for UserChannelId
§fn from(value: u128) -> UserChannelId
fn from(value: u128) -> UserChannelId
Converts to this type from the input type.
§impl FromHex for UserChannelId
impl FromHex for UserChannelId
fn from_hex(s: &str) -> Result<UserChannelId, DecodeError>
§impl FromStr for UserChannelId
impl FromStr for UserChannelId
§type Err = DecodeError
type Err = DecodeError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<UserChannelId, <UserChannelId as FromStr>::Err>
fn from_str(s: &str) -> Result<UserChannelId, <UserChannelId as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for UserChannelId
impl Hash for UserChannelId
§impl PartialEq for UserChannelId
impl PartialEq for UserChannelId
§impl RefCast for UserChannelId
impl RefCast for UserChannelId
type From = [u8; 16]
fn ref_cast(_from: &<UserChannelId as RefCast>::From) -> &UserChannelId
fn ref_cast_mut( _from: &mut <UserChannelId as RefCast>::From, ) -> &mut UserChannelId
§impl Serialize for UserChannelId
impl Serialize for UserChannelId
§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 Copy for UserChannelId
impl Eq for UserChannelId
impl StructuralPartialEq for UserChannelId
Auto Trait Implementations§
impl Freeze for UserChannelId
impl RefUnwindSafe for UserChannelId
impl Send for UserChannelId
impl Sync for UserChannelId
impl Unpin for UserChannelId
impl UnwindSafe for UserChannelId
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.