MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
mtcore::io::Formatter< SubnetV6 > Struct Reference

Formats a masked version 6 IP address with a subnet. More...

#include <ip.hpp>

Inheritance diagram for mtcore::io::Formatter< SubnetV6 >:
Collaboration diagram for mtcore::io::Formatter< SubnetV6 >:

Static Public Member Functions

template<WriterImpl WI>
static Result< size_t, typename Writer< WI >::ErrType > fmt (Writer< WI > *writer, FormatOptions, const SubnetV6 &val)
 

Detailed Description

Formats a masked version 6 IP address with a subnet.

Definition at line 438 of file ip.hpp.

Member Function Documentation

◆ fmt()

template<WriterImpl WI>
static Result< size_t, typename Writer< WI >::ErrType > mtcore::io::Formatter< SubnetV6 >::fmt ( Writer< WI > * writer,
FormatOptions ,
const SubnetV6 & val )
inlinestatic

Definition at line 440 of file ip.hpp.

440 {
441 if (!val.is_valid()) {
442 return print(writer, "[INVALID SUBNET V6]{}{}", val.ip, SubnetMaskV6::by_id(val.mask_id));
443 }
444 return print(writer, "{zt4}{}", val.ip, SubnetMaskV4::by_id(val.mask_id));
445 }
Result< size_t, typename Writer< WI >::ErrType > print(Writer< WI > &writer, const char *fmt, const Args &...args)
Prints arguments using a format string Element insert points are designated by a pair of curly braces...
Struct to override to specify how a type should be formatted.
Definition format.hpp:45
Here is the call graph for this function:

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