pub struct PartialOutput {
pub script_pubkey: Script,
pub amount: u64,
pub asset: AssetId,
pub blinding_key: Option<PublicKey>,
}Expand description
Represents partially prepared output data for Elements transactions.
Fields§
§script_pubkey: ScriptRepresents a bound ScriptPubKey for arbitrary output.
amount: u64Amount of a certain transaction output
asset: AssetIdAmount of a certain transaction output
blinding_key: Option<PublicKey>Public key of a blinding key
Implementations§
Source§impl PartialOutput
impl PartialOutput
Sourcepub fn new(script: Script, amount: u64, asset: AssetId) -> PartialOutput
pub fn new(script: Script, amount: u64, asset: AssetId) -> PartialOutput
Creates a new PartialOutput assigning a base script, amount, and AssetId.
Sourcepub fn new_metadata(data: &[u8]) -> PartialOutput
pub fn new_metadata(data: &[u8]) -> PartialOutput
Creates a new PartialOutput representing an OP_RETURN data metadata output.
Sourcepub fn with_blinding_key(self, blinding_key: PublicKey) -> PartialOutput
pub fn with_blinding_key(self, blinding_key: PublicKey) -> PartialOutput
Attaches an optional blinding public key to the partial output.
Trait Implementations§
Source§impl Clone for PartialOutput
impl Clone for PartialOutput
Source§fn clone(&self) -> PartialOutput
fn clone(&self) -> PartialOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PartialOutput
impl RefUnwindSafe for PartialOutput
impl Send for PartialOutput
impl Sync for PartialOutput
impl Unpin for PartialOutput
impl UnsafeUnpin for PartialOutput
impl UnwindSafe for PartialOutput
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