engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FWebJSResponse结构体 参考

Representation of a remote JS async response object. 更多...

#include <WebJSFunction.h>

+ 类 FWebJSResponse 继承关系图:

Public 成员函数

template<typename T >
void Failure (T Arg) const
 Indicate failed completion, passing an error message back to JS. 更多...
 
void Success () const
 Indicate successful completion without a return value. 更多...
 
template<typename T >
void Success (T Arg) const
 Indicate successful completion passing a return value back. 更多...
 

详细描述

Representation of a remote JS async response object.

UFUNCTIONs taking a FWebJSResponse will get it passed in automatically when called from a web browser. Pass a result or error back by invoking Success or Failure on the object. UFunctions accepting a FWebJSResponse should have a void return type, as any value returned from the function will be ignored. Calling the response methods does not have to happen before returning from the function, which means you can use this to implement asynchronous functionality.

Note that the remote object will become invalid as soon as a result has been delivered, so you can only call either Success or Failure once.

成员函数说明

◆ Failure()

template<typename T >
void FWebJSResponse::Failure ( T  Arg) const
inline

Indicate failed completion, passing an error message back to JS.

The remote Promise's catch() handler will be executed with the value passed as the error reason.

◆ Success() [1/2]

void FWebJSResponse::Success ( ) const
inline

Indicate successful completion without a return value.

The remote Promise's then() handler will be executed without arguments.

◆ Success() [2/2]

template<typename T >
void FWebJSResponse::Success ( T  Arg) const
inline

Indicate successful completion passing a return value back.

The remote Promise's then() handler will be executed with the value passed as its single argument.


该结构体的文档由以下文件生成: