pub fn initSet(allocator: Allocator, value: anytype) !Managed
Creates a new Managed with value value.
Managed
value
This is identical to an init, followed by a set.
init
set
allocator: Allocator
2849 2850 2851 2852 2853 2854
pub fn initSet(allocator: Allocator, value: anytype) !Managed { var s = try Managed.init(allocator); errdefer s.deinit(); try s.set(value); return s; }
Creates a new
Managedwith valuevalue.This is identical to an
init, followed by aset.