DoxigAlpha

adaptToNewApi

Helper for bridging to the new Writer API while upgrading.

Function parameters

Parameters

#
self:*const Self
buffer:[]u8

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
adaptToNewApi
Helper for bridging to the new `Writer` API while upgrading.

Source

Implementation

#
pub fn adaptToNewApi(self: *const Self, buffer: []u8) Adapter {
    return .{
        .derp_writer = self.*,
        .new_interface = .{
            .buffer = buffer,
            .vtable = &.{ .drain = Adapter.drain },
        },
    };
}