blob: 342fd357eb31c37e93261666480a39d3c891df38 [file] [log] [blame]
<html devsite="true">
<head>
<title>SnapshotApplyResult</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>SnapshotApplyResult</h1>
<p>
<pre>public class <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html">SnapshotApplyResult</a></pre>
</p>
<div class="devsite-table-wrapper"><devsite-expandable><span class="expand-control jd-sumtable-subclasses">Known direct subclasses
<div class="showalways" id="subclasses-direct"><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure.html">SnapshotApplyResult.Failure</a>, <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">SnapshotApplyResult.Success</a></div>
</span>
<div id="subclasses-direct-summary">
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure.html">SnapshotApplyResult.Failure</a></code></td>
<td></td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">SnapshotApplyResult.Success</a></code></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</devsite-expandable> </div>
<hr>
<p>The result of a applying a mutable snapshot. <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">Success</a></code> indicates that the snapshot was successfully applied and is not visible as the global state of the state object (or visible in the parent snapshot for a nested snapshot). <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure.html">Failure</a></code> indicates one or more state objects were modified by both this snapshot and in the global (or parent) snapshot.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Nested types</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td>
<div><code>public final class <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure.html">SnapshotApplyResult.Failure</a> extends <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html">SnapshotApplyResult</a></code></div>
</td>
</tr>
<tr>
<td>
<div><code>public static class <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">SnapshotApplyResult.Success</a> extends <a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html">SnapshotApplyResult</a></code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public fields</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code>abstract boolean</code></td>
<td>
<div><code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#succeeded()">succeeded</a></code></div>
<p>True if the result is <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">Success</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Protected constructors</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td>
<div><code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#SnapshotApplyResult()">SnapshotApplyResult</a>()</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public methods</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code>abstract void</code></td>
<td>
<div><code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#check()">check</a>()</code></div>
<p>Check the result of an apply.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list">
<h2>Public fields</h2>
<div class="api-item"><a name="getSucceeded()"></a><a name="setSucceeded()"></a><a name="getSucceeded--"></a><a name="setSucceeded--"></a>
<h3 class="api-name" id="succeeded()">succeeded</h3>
<pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;boolean&nbsp;<a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#succeeded()">succeeded</a></pre>
<p>True if the result is <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">Success</a></code>.</p>
</div>
</div>
<div class="list">
<h2>Protected constructors</h2>
<div class="api-item"><a name="SnapshotApplyResult--"></a><a name="snapshotapplyresult"></a>
<h3 class="api-name" id="SnapshotApplyResult()">SnapshotApplyResult</h3>
<pre class="api-signature no-pretty-print">protected&nbsp;<a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#SnapshotApplyResult()">SnapshotApplyResult</a>()</pre>
</div>
</div>
<div class="list">
<h2>Public methods</h2>
<div class="api-item"><a name="check--"></a><a name="check"></a>
<h3 class="api-name" id="check()">check</h3>
<pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;void&nbsp;<a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#check()">check</a>()</pre>
<p>Check the result of an apply. If the result is <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success.html">Success</a></code> then this does does nothing. If the result is <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure.html">Failure</a></code> then a <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyConflictException.html">SnapshotApplyConflictException</a></code> exception is thrown. Once <code><a href="/reference/androidx/compose/runtime/snapshots/SnapshotApplyResult.html#check()">check</a></code> as been called the snapshot is disposed.</p>
</div>
</div>
</body>
</html>