struct Result(T)

Included Modules

Defined in:

test-kemal.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(data : T | Nil, code : Int32, msg : String) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.err(code : Int32, msg : String) : Result(T | Nil) #

[View source]
def self.ok(data : T | Nil) : Result(T) #

[View source]
def self.ok : Result(T) #

[View source]

Instance Method Detail

def clone #

[View source]
def code : Int32 #

def copy_with(data _data = @data, code _code = @code, msg _msg = @msg) #

[View source]
def data : T | Nil #

def msg : String #