Struct scrypto::resource::non_fungible::NonFungible
source · pub struct NonFungible<T: NonFungibleData> {
non_fungible_global_id: NonFungibleGlobalId,
data: PhantomData<T>,
}
Expand description
Represents a non-fungible unit.
Fields§
§non_fungible_global_id: NonFungibleGlobalId
§data: PhantomData<T>
Implementations§
source§impl<T: NonFungibleData> NonFungible<T>
impl<T: NonFungibleData> NonFungible<T>
sourcepub fn resource_address(&self) -> ResourceAddress
pub fn resource_address(&self) -> ResourceAddress
Returns the resource address.
sourcepub fn global_id(&self) -> &NonFungibleGlobalId
pub fn global_id(&self) -> &NonFungibleGlobalId
Returns a reference to the non-fungible address.
sourcepub fn local_id(&self) -> &NonFungibleLocalId
pub fn local_id(&self) -> &NonFungibleLocalId
Returns a reference to the the non-fungible ID.
Trait Implementations§
source§impl<T: Debug + NonFungibleData> Debug for NonFungible<T>
impl<T: Debug + NonFungibleData> Debug for NonFungible<T>
source§impl<T: NonFungibleData> From<NonFungibleGlobalId> for NonFungible<T>
impl<T: NonFungibleData> From<NonFungibleGlobalId> for NonFungible<T>
source§fn from(non_fungible_global_id: NonFungibleGlobalId) -> Self
fn from(non_fungible_global_id: NonFungibleGlobalId) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> RefUnwindSafe for NonFungible<T>where T: RefUnwindSafe,
impl<T> Send for NonFungible<T>where T: Send,
impl<T> Sync for NonFungible<T>where T: Sync,
impl<T> Unpin for NonFungible<T>where T: Unpin,
impl<T> UnwindSafe for NonFungible<T>where T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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