ref
이 페이지에서

ref

함수

Passes a place to a parameter declared Ref<T>, as WGSL's &x does: swap(ref(x), ref(y)).

이름마다 붙은 시그니처와 설명은 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

declare function ref<T>(place: T): T

매개변수

  • place T

반환값

T

설명

The place is a let, a const whose initializer built its value, a module variable, a read_write storage element, or a field or element of one of those. One call takes no two references to one variable when the callee writes either.

예제

함께 보기

이 페이지 편집 문제 보고