ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
Loading...
Searching...
No Matches
ndn::NameComponent Struct Reference

Name component. More...

#include <ndn/name.hpp>

Public Member Functions

std::string_view asString () const
 Get the component as a string view.
 

Public Attributes

const uint8_t * value
 Pointer to the component value.
 
size_t size
 Size of the component in bytes.
 

Detailed Description

Name component.

A structure representing an individual component of a Name. Holds a pointer to and size of the component data in the buffer.

Note
This pointer references the original Name buffer and becomes invalid when the Name is destroyed.

Definition at line 26 of file name.hpp.

Member Function Documentation

◆ asString()

std::string_view ndn::NameComponent::asString ( ) const
inline

Get the component as a string view.

Returns
string_view of the component value

Definition at line 34 of file name.hpp.

References size, and value.

Member Data Documentation

◆ size

size_t ndn::NameComponent::size

Size of the component in bytes.

Definition at line 28 of file name.hpp.

Referenced by asString(), ndn::Name::compare(), ndn::Name::isPrefixOf(), and ndn::Name::toUri().

◆ value

const uint8_t* ndn::NameComponent::value

Pointer to the component value.

Definition at line 27 of file name.hpp.

Referenced by asString(), ndn::Name::compare(), ndn::Name::component(), ndn::Certificate::fromData(), ndn::Name::isPrefixOf(), and ndn::Name::toUri().


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