template <bool is_import>

class Link

Defined at line 227 of file ../../src/ui/scenic/lib/utils/object_linker.h

Represents one endpoint of a Link between two objects in different

|Session|s.

Links can be moved, but not copied. Valid Links can only be constructed by

the CreateExport and CreateImport methods.

Public Methods

void Link<is_import> ()

Defined at line 232 of file ../../src/ui/scenic/lib/utils/object_linker.h

void ~Link<is_import> ()

Defined at line 233 of file ../../src/ui/scenic/lib/utils/object_linker.h

void Link<is_import> (Link<is_import> && other)

TODO(https://fxbug.dev/42160907): Make this immovable type.

Defined at line 238 of file ../../src/ui/scenic/lib/utils/object_linker.h

Link<is_import> & operator= (nullptr_t )

Defined at line 244 of file ../../src/ui/scenic/lib/utils/object_linker.h

bool valid ()

Defined at line 250 of file ../../src/ui/scenic/lib/utils/object_linker.h

bool initialized ()

Defined at line 254 of file ../../src/ui/scenic/lib/utils/object_linker.h

zx_koid_t endpoint_id ()

Defined at line 258 of file ../../src/ui/scenic/lib/utils/object_linker.h

Link<is_import> & operator= (Link<is_import> && other)

Defined at line 351 of file ../../src/ui/scenic/lib/utils/object_linker.h

void Initialize (std::function<void (PeerObj)> link_resolved, std::function<void (bool)> link_invalidated)

Initialize the Link with an |object| and callbacks for |link_resolved|

and |link_invalidated| events, making it ready for connection to its peer.

The |link_invalidated| event is guaranteed to be called regardless of

whether or not the |link_resolved| callback is, including if this Link

is destroyed, in which case |on_destruction| will be true.

Defined at line 376 of file ../../src/ui/scenic/lib/utils/object_linker.h

std::optional<zx::handle> ReleaseToken ()

Releases the zx::handle for this link, allowing the caller to establish a new link with it.

This operation works regardless of whether or not the link has resolved. If the link was

resolved, the peer receives a |link_invalidated| callback and is put back in the

initialized-but-unresolved state.

Defined at line 392 of file ../../src/ui/scenic/lib/utils/object_linker.h

Friends

template <bool is_import>
class ObjectLinker