thistle-sdk
Thistle SDK documentation
Loading...
Searching...
No Matches
rustls_str Struct Reference

#include <rustls.h>

Data Fields

const char * data
 
size_t len
 

Detailed Description

A read-only view on a Rust &str. The contents are guaranteed to be valid UTF-8. As an additional guarantee on top of Rust's normal UTF-8 guarantee, a rustls_str is guaranteed not to contain internal NUL bytes, so it is safe to interpolate into a C string or compare using strncmp. Keep in mind that it is not NUL-terminated.

The memory exposed is available as specified by the function using this in its signature. For instance, when this is a parameter to a callback, the lifetime will usually be the duration of the callback. Functions that receive one of these must not dereference the data pointer beyond the allowed lifetime.

Field Documentation

◆ data

const char* rustls_str::data

◆ len

size_t rustls_str::len

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