pub struct ElectrumWalletFile { /* private fields */ }Expand description
Representation of an electrum wallet file. Has custom serialization and de-serialization routines to more accurately represent what we need, and the electrum wallet file format.
Implementations§
Source§impl ElectrumWalletFile
impl ElectrumWalletFile
Sourcepub fn new(
keystores: &[Keystore],
min_signatures: u8,
) -> Result<Self, Electrum2DescriptorError>
pub fn new( keystores: &[Keystore], min_signatures: u8, ) -> Result<Self, Electrum2DescriptorError>
Construct a wallet
Sourcepub fn wallet_type(&self) -> &WalletType
pub fn wallet_type(&self) -> &WalletType
Getter for wallet_type
Sourcepub fn from_file(wallet_file: &Path) -> Result<Self, Electrum2DescriptorError>
pub fn from_file(wallet_file: &Path) -> Result<Self, Electrum2DescriptorError>
Parse an electrum wallet file
Sourcepub fn to_file(
&self,
wallet_file: &Path,
) -> Result<(), Electrum2DescriptorError>
pub fn to_file( &self, wallet_file: &Path, ) -> Result<(), Electrum2DescriptorError>
Write to an electrum wallet file
Sourcepub fn from_descriptor(desc: &str) -> Result<Self, Electrum2DescriptorError>
pub fn from_descriptor(desc: &str) -> Result<Self, Electrum2DescriptorError>
Construct from an output descriptor. Only the external descriptor is needed, the change descriptor is implied.
Sourcepub fn to_descriptors(&self) -> Result<Descriptors, Electrum2DescriptorError>
pub fn to_descriptors(&self) -> Result<Descriptors, Electrum2DescriptorError>
Generate output descriptors matching the electrum wallet
Trait Implementations§
Source§impl Clone for ElectrumWalletFile
impl Clone for ElectrumWalletFile
Source§fn clone(&self) -> ElectrumWalletFile
fn clone(&self) -> ElectrumWalletFile
Returns a duplicate 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 ElectrumWalletFile
impl Debug for ElectrumWalletFile
Source§impl<'de> Deserialize<'de> for ElectrumWalletFile
impl<'de> Deserialize<'de> for ElectrumWalletFile
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 Display for ElectrumWalletFile
impl Display for ElectrumWalletFile
Source§impl FromStr for ElectrumWalletFile
impl FromStr for ElectrumWalletFile
Source§fn from_str(wallet_file: &str) -> Result<Self, Electrum2DescriptorError>
fn from_str(wallet_file: &str) -> Result<Self, Electrum2DescriptorError>
Parse an electrum wallet file from string
Source§type Err = Electrum2DescriptorError
type Err = Electrum2DescriptorError
The associated error which can be returned from parsing.
Source§impl PartialEq for ElectrumWalletFile
impl PartialEq for ElectrumWalletFile
Source§impl Serialize for ElectrumWalletFile
impl Serialize for ElectrumWalletFile
impl Eq for ElectrumWalletFile
impl StructuralPartialEq for ElectrumWalletFile
Auto Trait Implementations§
impl Freeze for ElectrumWalletFile
impl RefUnwindSafe for ElectrumWalletFile
impl Send for ElectrumWalletFile
impl Sync for ElectrumWalletFile
impl Unpin for ElectrumWalletFile
impl UnwindSafe for ElectrumWalletFile
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