OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::api::get_contents_fn Struct Reference

Function object to retrieve contents from a storage container in the OXY-API. More...

#include <storage.hpp>

Public Member Functions

maybe< contents_toperator() (IStoragePtr const &stg, oid_t const &oid) const

Detailed Description

Function object to retrieve contents from a storage container in the OXY-API.

This function object provides an operator() that takes a storage container pointer and an OID, and returns a maybe<contents_t> containing the contents if available. It is designed to be used in a constexpr context for compile-time evaluation of contents retrieval operations.

Member Function Documentation

◆ operator()()

maybe< contents_t > oxy::api::get_contents_fn::operator() ( IStoragePtr const & stg,
oid_t const & oid ) const
Parameters
stg- The storage container pointer from which to retrieve contents.
oid- The OID of the contents to retrieve.
Returns
A maybe<contents_t> containing the contents if available, or nothing() if not found.