Struct ibc::core::ics03_connection::connection::ConnectionEnd
source · [−]pub struct ConnectionEnd {
pub state: State,
/* private fields */
}
Fields
state: State
Implementations
sourceimpl ConnectionEnd
impl ConnectionEnd
pub fn new(
state: State,
client_id: ClientId,
counterparty: Counterparty,
versions: Vec<Version>,
delay_period: Duration
) -> Self
sourcepub fn set_counterparty(&mut self, new_cparty: Counterparty)
pub fn set_counterparty(&mut self, new_cparty: Counterparty)
Setter for the counterparty
field.
sourcepub fn set_version(&mut self, new_version: Version)
pub fn set_version(&mut self, new_version: Version)
Setter for the version
field.
sourcepub fn counterparty_matches(&self, other: &Counterparty) -> bool
pub fn counterparty_matches(&self, other: &Counterparty) -> bool
Helper function to compare the counterparty of this end with another counterparty.
sourcepub fn client_id_matches(&self, other: &ClientId) -> bool
pub fn client_id_matches(&self, other: &ClientId) -> bool
Helper function to compare the client id of this end with another client identifier.
sourcepub fn is_uninitialized(&self) -> bool
pub fn is_uninitialized(&self) -> bool
Helper function to determine whether the connection is uninitialized.
sourcepub fn state_matches(&self, other: &State) -> bool
pub fn state_matches(&self, other: &State) -> bool
Helper function to compare the state of this end with another state.
sourcepub fn client_id(&self) -> &ClientId
pub fn client_id(&self) -> &ClientId
Getter for the client id on the local party of this connection end.
sourcepub fn counterparty(&self) -> &Counterparty
pub fn counterparty(&self) -> &Counterparty
Getter for the counterparty.
sourcepub fn delay_period(&self) -> Duration
pub fn delay_period(&self) -> Duration
Getter for the delay_period field. This represents the duration, at minimum, to delay the sending of a packet after the client update for that packet has been submitted.
sourcepub fn validate_basic(&self) -> Result<(), ValidationError>
pub fn validate_basic(&self) -> Result<(), ValidationError>
TODO: Clean this up, probably not necessary.
Trait Implementations
sourceimpl Clone for ConnectionEnd
impl Clone for ConnectionEnd
sourcefn clone(&self) -> ConnectionEnd
fn clone(&self) -> ConnectionEnd
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ConnectionEnd
impl Debug for ConnectionEnd
sourceimpl Default for ConnectionEnd
impl Default for ConnectionEnd
sourceimpl<'de> Deserialize<'de> for ConnectionEnd
impl<'de> Deserialize<'de> for ConnectionEnd
sourcefn 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
sourceimpl From<ConnectionEnd> for RawConnectionEnd
impl From<ConnectionEnd> for RawConnectionEnd
sourcefn from(value: ConnectionEnd) -> Self
fn from(value: ConnectionEnd) -> Self
Converts to this type from the input type.
sourceimpl Hash for ConnectionEnd
impl Hash for ConnectionEnd
sourceimpl PartialEq<ConnectionEnd> for ConnectionEnd
impl PartialEq<ConnectionEnd> for ConnectionEnd
sourcefn eq(&self, other: &ConnectionEnd) -> bool
fn eq(&self, other: &ConnectionEnd) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Protobuf<ConnectionEnd> for ConnectionEnd
impl Protobuf<ConnectionEnd> for ConnectionEnd
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
sourcefn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
fn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
Encodes into a Protobuf-encoded Vec<u8>
.
sourcefn 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). Read more
sourceimpl Serialize for ConnectionEnd
impl Serialize for ConnectionEnd
sourceimpl TryFrom<ConnectionEnd> for ConnectionEnd
impl TryFrom<ConnectionEnd> for ConnectionEnd
impl Eq for ConnectionEnd
impl StructuralEq for ConnectionEnd
impl StructuralPartialEq for ConnectionEnd
Auto Trait Implementations
impl RefUnwindSafe for ConnectionEnd
impl Send for ConnectionEnd
impl Sync for ConnectionEnd
impl Unpin for ConnectionEnd
impl UnwindSafe for ConnectionEnd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more