Struct lnp::features::InitFeatures [−][src]
Flags are numbered from the least-significant bit, at bit 0 (i.e. 0x1, an even bit). They are generally assigned in pairs so that features can be introduced as optional (odd bits) and later upgraded to be compulsory (even bits), which will be refused by outdated nodes: see BOLT #1: The init Message.
Specification
https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md
Fields
option_data_loss_protect: Option<bool>
Requires or supports extra channel_reestablish
fields
initial_routing_sync: bool
Sending node needs a complete routing information dump
option_upfront_shutdown_script: Option<bool>
Commits to a shutdown scriptpubkey when opening channel
gossip_queries: Option<bool>
More sophisticated gossip control
var_onion_optin: Option<bool>
Requires/supports variable-length routing onion payloads
gossip_queries_ex: Option<bool>
Gossip queries can include additional information
option_static_remotekey: Option<bool>
Static key for remote output
payment_secret: Option<bool>
Node supports payment_secret
field
basic_mpp: Option<bool>
Node can receive basic multi-part payments
option_support_large_channel: Option<bool>
Can create large channels
option_anchor_outputs: Option<bool>
Anchor outputs
unknown: FlagVec
Rest of feature flags which are unknown to the current implementation
Implementations
impl InitFeatures
[src]
pub fn check(&self) -> Result<(), Error>
[src]
pub fn check_consistency(&self) -> Result<(), NoRequiredFeatureError>
[src]
pub fn check_unknown_even(&self) -> Result<(), Error>
[src]
pub fn known_features(&self) -> BTreeMap<Feature, bool>
[src]
Trait Implementations
impl Clone for InitFeatures
[src]
fn clone(&self) -> InitFeatures
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for InitFeatures
[src]
impl Default for InitFeatures
[src]
fn default() -> InitFeatures
[src]
impl Display for InitFeatures
[src]
impl Eq for InitFeatures
[src]
impl Hash for InitFeatures
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LightningDecode for InitFeatures
[src]
fn lightning_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
pub fn lightning_deserialize(data: &impl AsRef<[u8]>) -> Result<Self, Error>
[src]
impl LightningEncode for InitFeatures
[src]
fn lightning_encode<E: Write>(&self, e: E) -> Result<usize, Error>
[src]
pub fn lightning_serialize(&self) -> Vec<u8, Global>
[src]
impl Ord for InitFeatures
[src]
fn cmp(&self, other: &InitFeatures) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<InitFeatures> for InitFeatures
[src]
fn eq(&self, other: &InitFeatures) -> bool
[src]
fn ne(&self, other: &InitFeatures) -> bool
[src]
impl PartialOrd<InitFeatures> for InitFeatures
[src]
fn partial_cmp(&self, other: &InitFeatures) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StrictDecode for InitFeatures
[src]
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
pub fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
[src]
impl StrictEncode for InitFeatures
[src]
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
[src]
pub fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
[src]
impl StructuralEq for InitFeatures
[src]
impl StructuralPartialEq for InitFeatures
[src]
impl TryFrom<FlagVec> for InitFeatures
[src]
Auto Trait Implementations
impl RefUnwindSafe for InitFeatures
impl Send for InitFeatures
impl Sync for InitFeatures
impl Unpin for InitFeatures
impl UnwindSafe for InitFeatures
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,