Euphoria
Public Member Functions | Public Attributes | List of all members
eu::HshO Struct Reference

Hash of an owning string. More...

Public Member Functions

constexpr HshO (const std::string &s)
 Creates a new hash object and computes the hash at compile time if possible.
 
constexpr HshO (const std::string_view &s)
 Creates a new hash object and computes the hash at compile time if possible.
 
constexpr HshO (const Hsh &o)
 Copy data from a non-owning hash.
 

Public Attributes

u64 hash
 The actual hash.
 
std::string text
 Owning storage of the printable string, if enabled.
 

Detailed Description

Hash of an owning string.

It will be (pretty) printed as the original string if that is enabled. Treat it as a regular std::string but without the string functionality.

See also
hash64
Hsh

Definition at line 52 of file hash.string.h.

Constructor & Destructor Documentation

◆ HshO() [1/3]

constexpr eu::HshO::HshO ( const std::string &  s)
inlineconstexpr

Creates a new hash object and computes the hash at compile time if possible.

Definition at line 65 of file hash.string.h.

◆ HshO() [2/3]

constexpr eu::HshO::HshO ( const std::string_view &  s)
inlineconstexpr

Creates a new hash object and computes the hash at compile time if possible.

Definition at line 73 of file hash.string.h.

◆ HshO() [3/3]

constexpr eu::HshO::HshO ( const Hsh o)
inlineconstexpr

Copy data from a non-owning hash.

Definition at line 81 of file hash.string.h.

Member Data Documentation

◆ hash

u64 eu::HshO::hash

The actual hash.

Prefer to use operators on HshO instead of accessing this directly.

Definition at line 56 of file hash.string.h.

◆ text

std::string eu::HshO::text

Owning storage of the printable string, if enabled.

Please ignore if possible and just print as normal.

Definition at line 61 of file hash.string.h.


The documentation for this struct was generated from the following file: