Skip to content

Latest commit

 

History

History
142 lines (65 loc) · 4.69 KB

display.md

File metadata and controls

142 lines (65 loc) · 4.69 KB

Module 0x2::display

Resource Display

Display is used to define the display of the T

struct Display<T> has key

Struct DisplayCreate

Event when Display created

struct DisplayCreate<T> has copy, drop

Function display

Create or borrow_mut Display object for T Only the module of T can call this function.

#[private_generics(#[T])]
public fun display<T: key>(): &mut object::Object<display::Display<T>>

Function set_value

Set the key-value pair for the display object If the key already exists, the value will be updated, otherwise a new key-value pair will be created.

public fun set_value<T>(self: &mut object::Object<display::Display<T>>, key: string::String, value: string::String)

Function borrow_value

Function borrow_mut_value

Function remove_value

public fun remove_value<T>(self: &mut object::Object<display::Display<T>>, key: &string::String)

Function keys

Function values

Function contains_key

public fun contains_key<T>(self: &object::Object<display::Display<T>>, key: &string::String): bool