pub struct Embedding {
pub bytes: Vec<u8>,
pub txid: Txid,
pub location: EmbeddingLocation,
}Expand description
A struct containing data and its location in a transaction
Fields§
§bytes: Vec<u8>The data
txid: TxidThe transaction ID
location: EmbeddingLocationThe location in the transaction
Implementations§
Source§impl Embedding
impl Embedding
Sourcepub fn id(&self) -> EmbeddingId
pub fn id(&self) -> EmbeddingId
Returns the embedding id
Sourcepub fn to_type(&self) -> EmbeddingType
pub fn to_type(&self) -> EmbeddingType
Returns the embedding type
Sourcepub fn from_transaction(tx: &Transaction) -> Vec<Self>
pub fn from_transaction(tx: &Transaction) -> Vec<Self>
Extracts the tape in a transaction
Trait Implementations§
impl StructuralPartialEq for Embedding
Auto Trait Implementations§
impl Freeze for Embedding
impl RefUnwindSafe for Embedding
impl Send for Embedding
impl Sync for Embedding
impl Unpin for Embedding
impl UnsafeUnpin for Embedding
impl UnwindSafe for Embedding
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