Function initSet [src]

Creates a new Managed with value value. This is identical to an init, followed by a set.

Prototype

pub fn initSet(allocator: Allocator, value: anytype) !Managed

Parameters

allocator: Allocator

Source

pub fn initSet(allocator: Allocator, value: anytype) !Managed { var s = try Managed.init(allocator); errdefer s.deinit(); try s.set(value); return s; }