DiscordLazyValue

public class DiscordLazyValue<V>

The backing class for DiscordLazyDictionary’s lazy values.

  • The value this objects holds. Forces evaluation.

    Declaration

    Swift

    public var value: V
  • Creates a DiscordLazyValue whose value hasn’t been computed yet.

    Declaration

    Swift

    public static func lazy(_ future: @escaping () -> V) -> DiscordLazyValue
  • Creates a DiscordLazyValue whose value has been computed.

    Declaration

    Swift

    public static func real(_ real: V) -> DiscordLazyValue
  • The description of the DiscordLazyValue. Does not evaluate if it hasn’t been already.

    Declaration

    Swift

    public var description: String