musli_core/de/
decode_slice_builder.rs1use crate::{Allocator, Context};
2
3pub trait DecodeSliceBuilder<T, A>: Sized
5where
6 A: Allocator,
7{
8 fn new<C>(cx: C) -> Result<Self, C::Error>
10 where
11 C: Context<Allocator = A>;
12
13 fn with_capacity<C>(cx: C, capacity: usize) -> Result<Self, C::Error>
15 where
16 C: Context<Allocator = A>;
17
18 fn push<C>(&mut self, cx: C, value: T) -> Result<(), C::Error>
20 where
21 C: Context<Allocator = A>;
22
23 fn reserve<C>(&mut self, cx: C, capacity: usize) -> Result<(), C::Error>
25 where
26 C: Context<Allocator = A>;
27
28 unsafe fn set_len(&mut self, len: usize);
35
36 fn as_mut_ptr(&mut self) -> *mut T;
38}