pub struct FundedAddressData {
pub tx_count: u32,
pub funded_txo_count: u32,
pub spent_txo_count: u32,
pub received: Sats,
pub sent: Sats,
pub realized_cap_raw: CentsSats,
pub investor_cap_raw: CentsSquaredSats,
/* private fields */
}Expand description
Data for a funded (non-empty) address with current balance
Fields§
§tx_count: u32Total transaction count
funded_txo_count: u32Number of transaction outputs funded to this address
spent_txo_count: u32Number of transaction outputs spent by this address
received: SatsSatoshis received by this address
sent: SatsSatoshis sent by this address
realized_cap_raw: CentsSatsThe realized capitalization: Σ(price × sats)
investor_cap_raw: CentsSquaredSatsThe investor capitalization: Σ(price² × sats)
Implementations§
Source§impl FundedAddressData
impl FundedAddressData
pub fn balance(&self) -> Sats
pub fn realized_price(&self) -> CentsUnsigned
pub fn cost_basis_snapshot(&self) -> CostBasisSnapshot
pub fn has_0_sats(&self) -> bool
pub fn utxo_count(&self) -> u32
pub fn has_1_utxos(&self) -> bool
pub fn has_0_utxos(&self) -> bool
pub fn receive(&mut self, amount: Sats, price: Option<CentsUnsigned>)
pub fn receive_outputs( &mut self, amount: Sats, price: Option<CentsUnsigned>, output_count: u32, )
pub fn send( &mut self, amount: Sats, previous_price: Option<CentsUnsigned>, ) -> Result<()>
Trait Implementations§
Source§impl Bytes for FundedAddressData
impl Bytes for FundedAddressData
Source§impl Clone for FundedAddressData
impl Clone for FundedAddressData
Source§fn clone(&self) -> FundedAddressData
fn clone(&self) -> FundedAddressData
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 FundedAddressData
impl Debug for FundedAddressData
Source§impl Default for FundedAddressData
impl Default for FundedAddressData
Source§fn default() -> FundedAddressData
fn default() -> FundedAddressData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FundedAddressData
impl<'de> Deserialize<'de> for FundedAddressData
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 FundedAddressData
impl Display for FundedAddressData
Source§impl Formattable for FundedAddressData
impl Formattable for FundedAddressData
Source§impl From<&EmptyAddressData> for FundedAddressData
impl From<&EmptyAddressData> for FundedAddressData
Source§fn from(value: &EmptyAddressData) -> Self
fn from(value: &EmptyAddressData) -> Self
Converts to this type from the input type.
Source§impl From<&FundedAddressData> for EmptyAddressData
impl From<&FundedAddressData> for EmptyAddressData
Source§fn from(value: &FundedAddressData) -> Self
fn from(value: &FundedAddressData) -> Self
Converts to this type from the input type.
Source§impl From<&FundedAddressData> for SupplyState
impl From<&FundedAddressData> for SupplyState
Source§fn from(value: &FundedAddressData) -> Self
fn from(value: &FundedAddressData) -> Self
Converts to this type from the input type.
Source§impl From<EmptyAddressData> for FundedAddressData
impl From<EmptyAddressData> for FundedAddressData
Source§fn from(value: EmptyAddressData) -> Self
fn from(value: EmptyAddressData) -> Self
Converts to this type from the input type.
Source§impl From<FundedAddressData> for EmptyAddressData
impl From<FundedAddressData> for EmptyAddressData
Source§fn from(value: FundedAddressData) -> Self
fn from(value: FundedAddressData) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for FundedAddressData
impl JsonSchema for FundedAddressData
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for FundedAddressData
impl RefUnwindSafe for FundedAddressData
impl Send for FundedAddressData
impl Sync for FundedAddressData
impl Unpin for FundedAddressData
impl UnwindSafe for FundedAddressData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more