class Snapshot

Defined at line 64 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

|Snapshot| parses an incoming VMO buffer and produces a snapshot of

the VMO contents. |Snapshot::Options| determines the behavior of

snapshotting if a concurrent write potentially occurred.

Example:

Snapshot* snapshot;

zx_status_t status = Snapshot::Create(std::move(vmo),

{.read_attempts = 1024, .skip_consistency_check = false},

&snapshot

);

Test Example:

zx_status_t status = Snapshot::Create(std::move(vmo),

{.read_attempts = 1024, .skip_consistency_check = false},

std::make_unique

<TestCallback

>(),

&snapshot

);

Public Members

static Options kDefaultOptions

Public Methods

zx_status_t Create (const zx::vmo & vmo, Snapshot * out_snapshot)

Create a new snapshot of the given VMO using default options.

Defined at line 55 of file ../../zircon/system/ulib/inspect/vmo/snapshot.cc

zx_status_t Create (const zx::vmo & vmo, Options options, Snapshot * out_snapshot)

Create a new snapshot of the given VMO using the given options.

Defined at line 59 of file ../../zircon/system/ulib/inspect/vmo/snapshot.cc

zx_status_t Create (const zx::vmo & vmo, Options options, ReadObserver read_observer, Snapshot * out_snapshot)

Create a new snapshot of the given VMO using the given options, and use the read_observer

for observing snapshot operations.

Defined at line 63 of file ../../zircon/system/ulib/inspect/vmo/snapshot.cc

zx_status_t Create (BackingBuffer && buffer, Snapshot * out_snapshot)

Create a new snapshot over the supplied buffer. If the buffer cannot be interpreted as a

snapshot, an error status is returned. There are no observers or writers involved.

Defined at line 33 of file ../../zircon/system/ulib/inspect/vmo/snapshot.cc

void Snapshot ()

Defined at line 96 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

void ~Snapshot ()

Defined at line 97 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

void Snapshot (Snapshot && )

Defined at line 98 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

void Snapshot (const Snapshot & )

Defined at line 99 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

Snapshot & operator= (Snapshot && )

Defined at line 100 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

Snapshot & operator= (const Snapshot & )

Defined at line 101 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

bool operator bool ()

Defined at line 103 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

const uint8_t * data ()

Returns the start of the snapshot data.

Defined at line 106 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

size_t size ()

Returns the size of the snapshot.

Defined at line 109 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/snapshot.h

Records