lightning 0.0.117-alpha2

A Bitcoin Lightning library in Rust. Does most of the hard work, without implying a specific runtime, requiring clients implement basic network logic, chain interactions and disk storage. Still missing tons of error-handling. See GitHub issues for suggested projects if you want to contribute. Don't have to bother telling you not to use this for anything serious, because you'd have to build a client around it to even try.
Documentation
use crate::sign::{ChannelSigner, EcdsaChannelSigner};

pub(crate) enum ChannelSignerType<ECS: EcdsaChannelSigner> {
	// in practice, this will only ever be an EcdsaChannelSigner (specifically, Writeable)
	Ecdsa(ECS)
}

impl<ECS: EcdsaChannelSigner> ChannelSignerType<ECS>{
	pub(crate) fn as_ref(&self) -> &dyn ChannelSigner {
		match self {
			ChannelSignerType::Ecdsa(ecs) => ecs
		}
	}

	pub(crate) fn as_mut(&mut self) -> &mut dyn ChannelSigner {
		match self {
			ChannelSignerType::Ecdsa(ecs) => ecs
		}
	}

	pub(crate) fn as_ecdsa(&self) -> Option<&ECS> {
		match self {
			ChannelSignerType::Ecdsa(ecs) => Some(ecs)
		}
	}

	pub(crate) fn as_mut_ecdsa(&mut self) -> Option<&mut ECS> {
		match self {
			ChannelSignerType::Ecdsa(ecs) => Some(ecs)
		}
	}
}