Struct ibc_core_connection_types::Counterparty
source · pub struct Counterparty {
pub client_id: ClientId,
pub connection_id: Option<ConnectionId>,
pub prefix: CommitmentPrefix,
}
Fields§
§client_id: ClientId
§connection_id: Option<ConnectionId>
§prefix: CommitmentPrefix
Implementations§
source§impl Counterparty
impl Counterparty
pub fn new( client_id: ClientId, connection_id: Option<ConnectionId>, prefix: CommitmentPrefix ) -> Self
sourcepub fn connection_id(&self) -> Option<&ConnectionId>
pub fn connection_id(&self) -> Option<&ConnectionId>
Getter for connection id.
pub fn prefix(&self) -> &CommitmentPrefix
Trait Implementations§
source§impl BorshDeserialize for Counterparty
impl BorshDeserialize for Counterparty
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for Counterparty
impl BorshSerialize for Counterparty
source§impl Clone for Counterparty
impl Clone for Counterparty
source§fn clone(&self) -> Counterparty
fn clone(&self) -> Counterparty
Returns a copy 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 moresource§impl Debug for Counterparty
impl Debug for Counterparty
source§impl Decode for Counterparty
impl Decode for Counterparty
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§impl<'de> Deserialize<'de> for Counterparty
impl<'de> Deserialize<'de> for Counterparty
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 Encode for Counterparty
impl Encode for Counterparty
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<Counterparty> for Counterparty
impl From<Counterparty> for Counterparty
source§fn from(value: Counterparty) -> Self
fn from(value: Counterparty) -> Self
Converts to this type from the input type.
source§impl Hash for Counterparty
impl Hash for Counterparty
source§impl JsonSchema for Counterparty
impl JsonSchema for Counterparty
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq for Counterparty
impl PartialEq for Counterparty
source§fn eq(&self, other: &Counterparty) -> bool
fn eq(&self, other: &Counterparty) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Protobuf<Counterparty> for Counterparty
impl Protobuf<Counterparty> for Counterparty
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode a length-delimited instance from
the buffer. Read more
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
source§fn encode_vec(self) -> Vec<u8>
fn encode_vec(self) -> Vec<u8>
Encodes into a Protobuf-encoded
Vec<u8>
.source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8>
(or equivalent).source§fn encode_length_delimited_vec(self) -> Vec<u8>
fn encode_length_delimited_vec(self) -> Vec<u8>
Encode with a length-delimiter to a
Vec<u8>
Protobuf-encoded message.source§impl Serialize for Counterparty
impl Serialize for Counterparty
source§impl TryFrom<Counterparty> for Counterparty
impl TryFrom<Counterparty> for Counterparty
§type Error = ConnectionError
type Error = ConnectionError
The type returned in the event of a conversion error.
source§impl TypeInfo for Counterparty
impl TypeInfo for Counterparty
impl EncodeLike for Counterparty
impl Eq for Counterparty
impl StructuralPartialEq for Counterparty
Auto Trait Implementations§
impl Freeze for Counterparty
impl RefUnwindSafe for Counterparty
impl Send for Counterparty
impl Sync for Counterparty
impl Unpin for Counterparty
impl UnwindSafe for Counterparty
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