# Uuid

<div class="jsdoc-content"><header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>
            <span class="ancestors"><a href="index.html">types</a>~</span>Uuid<span class="signature">(buffer)</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>Represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="Uuid"><span class="type-signature"></span>new Uuid<span class="signature">(buffer)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Creates a new instance of Uuid based on a Buffer</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>buffer</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The 16-length buffer.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L9" target="_blank" rel="noopener">types/uuid.ts, line 9</a></p></div>




















    
    

    

    

    

    

    

    

    
        </div>

## Members

<div class="jsdoc-content">

        
            
<h4 class="name" id="buffer"><span class="type-signature">(readonly) </span>buffer<span class="type-signature"></span></h4>




<div class="description">
    <p>Returns the underlying buffer</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L37" target="_blank" rel="noopener">types/uuid.ts, line 37</a></p></div>






        
            
<h4 class="name" id="uuidRegex"><span class="type-signature"></span>uuidRegex<span class="type-signature"></span></h4>




<div class="description">
    <p>Used to check if the UUID is in a correct format
Source: https://stackoverflow.com/a/6640851
Verified also with documentation of UUID library in Rust: https://docs.rs/uuid/latest/uuid/</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L15" target="_blank" rel="noopener">types/uuid.ts, line 15</a></p></div>






        
    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

    
    <h4 class="name" id="equals"><span class="type-signature"></span>equals<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Compares this object to the specified object.
The result is true if and only if the argument is not null, is a UUID object, and
contains the same value, bit for bit, as this UUID.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The other value to test for equality.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L92" target="_blank" rel="noopener">types/uuid.ts, line 92</a></p></div>




















        
            

    

    
    <h4 class="name" id="getBuffer"><span class="type-signature"></span>getBuffer<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Gets the bytes representation of a Uuid</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L82" target="_blank" rel="noopener">types/uuid.ts, line 82</a></p></div>




















        
            

    

    
    <h4 class="name" id="inspect"><span class="type-signature"></span>inspect<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Provide the name of the constructor and the string representation</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L112" target="_blank" rel="noopener">types/uuid.ts, line 112</a></p></div>




















        
            

    

    
    <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the string representation.
Method used by the native JSON.stringify() to serialize this instance.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L120" target="_blank" rel="noopener">types/uuid.ts, line 120</a></p></div>




















        
            

    

    
    <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns a string representation of the value of this Uuid instance.
32 hex separated by hyphens, in the form of 00000000-0000-0000-0000-000000000000.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L103" target="_blank" rel="noopener">types/uuid.ts, line 103</a></p></div>




















        
            

    

    
    <h4 class="name" id=".fromString"><span class="type-signature">(static) </span>fromString<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Parses a string representation of a Uuid</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L48" target="_blank" rel="noopener">types/uuid.ts, line 48</a></p></div>




















        
            

    

    
    <h4 class="name" id=".random"><span class="type-signature">(static) </span>random<span class="signature">(callback)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Creates a new random (version 4) Uuid.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Optional callback to be invoked with the error as
first parameter and the created Uuid as second parameter.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.6.1/lib/types/uuid.ts#L64" target="_blank" rel="noopener">types/uuid.ts, line 64</a></p></div></div>
