pub struct ForwardHtlcInterceptResponse {
pub incoming_circuit_key: Option<CircuitKey>,
pub action: i32,
pub preimage: Vec<u8>,
pub failure_message: Vec<u8>,
pub failure_code: i32,
}
Expand description
ForwardHtlcInterceptResponse enables the caller to resolve a previously hold forward. The caller can choose either to:
Resume
: Execute the default behavior (usually forward).Reject
: Fail the htlc backwards.Settle
: Settle this htlc with a given preimage.
Fields§
§incoming_circuit_key: Option<CircuitKey>
The key of this forwarded htlc. It defines the incoming channel id and the index in this channel.
action: i32
The resolve action for this intercepted htlc.
preimage: Vec<u8>
The preimage in case the resolve action is Settle.
failure_message: Vec<u8>
Encrypted failure message in case the resolve action is Fail.
If failure_message is specified, the failure_code field must be set to zero.
failure_code: i32
Return the specified failure code in case the resolve action is Fail. The message data fields are populated automatically.
If a non-zero failure_code is specified, failure_message must not be set.
For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the default value for this field.
Implementations§
source§impl ForwardHtlcInterceptResponse
impl ForwardHtlcInterceptResponse
sourcepub fn action(&self) -> ResolveHoldForwardAction
pub fn action(&self) -> ResolveHoldForwardAction
Returns the enum value of action
, or the default if the field is set to an invalid enum value.
sourcepub fn set_action(&mut self, value: ResolveHoldForwardAction)
pub fn set_action(&mut self, value: ResolveHoldForwardAction)
Sets action
to the provided enum value.
sourcepub fn failure_code(&self) -> FailureCode
pub fn failure_code(&self) -> FailureCode
Returns the enum value of failure_code
, or the default if the field is set to an invalid enum value.
sourcepub fn set_failure_code(&mut self, value: FailureCode)
pub fn set_failure_code(&mut self, value: FailureCode)
Sets failure_code
to the provided enum value.
Trait Implementations§
source§impl Clone for ForwardHtlcInterceptResponse
impl Clone for ForwardHtlcInterceptResponse
source§fn clone(&self) -> ForwardHtlcInterceptResponse
fn clone(&self) -> ForwardHtlcInterceptResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ForwardHtlcInterceptResponse
impl Debug for ForwardHtlcInterceptResponse
source§impl Message for ForwardHtlcInterceptResponse
impl Message for ForwardHtlcInterceptResponse
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq for ForwardHtlcInterceptResponse
impl PartialEq for ForwardHtlcInterceptResponse
source§fn eq(&self, other: &ForwardHtlcInterceptResponse) -> bool
fn eq(&self, other: &ForwardHtlcInterceptResponse) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ForwardHtlcInterceptResponse
Auto Trait Implementations§
impl RefUnwindSafe for ForwardHtlcInterceptResponse
impl Send for ForwardHtlcInterceptResponse
impl Sync for ForwardHtlcInterceptResponse
impl Unpin for ForwardHtlcInterceptResponse
impl UnwindSafe for ForwardHtlcInterceptResponse
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request