subscription: remove dangling old implementation
Missed this before the commit train left the station.
This commit is contained in:
parent
79a45fd2e3
commit
b55dfe0732
@ -41,44 +41,3 @@ pub const Subscription = opaque {
|
|||||||
nats_c.natsSubscription_Destroy(@ptrCast(self));
|
nats_c.natsSubscription_Destroy(@ptrCast(self));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// pub fn Subscription(T: type) type {
|
|
||||||
// return struct {
|
|
||||||
// const Self = @This();
|
|
||||||
|
|
||||||
// _internal: *nats_c.natsSubscription,
|
|
||||||
// userdata: T,
|
|
||||||
// function: MessageCallback(T),
|
|
||||||
|
|
||||||
// pub fn create(
|
|
||||||
// allocator: std.mem.Allocator,
|
|
||||||
// userdata: T,
|
|
||||||
// callback: MessageCallback(T),
|
|
||||||
// ) AllocError!*Self {
|
|
||||||
// const self: *Self = try std.mem.Allocator.create(Self);
|
|
||||||
// self.userdata = userdata;
|
|
||||||
// self.function = callback;
|
|
||||||
// return self;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// pub fn wrap(
|
|
||||||
// self: *Self,
|
|
||||||
// internal: *nats_c.natsSubscription,
|
|
||||||
// ) void {
|
|
||||||
// // self._internal =
|
|
||||||
// }
|
|
||||||
|
|
||||||
// fn thunk(
|
|
||||||
// conn: ?*nats_c.natsConnection,
|
|
||||||
// sub: ?*nats_c.natsSubscription,
|
|
||||||
// msg: ?*nats_c.natsMsg,
|
|
||||||
// userdata: ?*const anyopaque,
|
|
||||||
// ) callconv(.C) void {
|
|
||||||
// self.function(self.userdata, connection, subscription, message);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn MessageCallback(comptime T: type) type {
|
|
||||||
return *const fn (userdata: T, connection: *Connection, subscription: *Subscription, message: *Message) void;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user