MCPcopy Create free account
hub / github.com/influxdata/influxdb / with_alignment

Method with_alignment

core/linear_buffer/src/linear_buffer.rs:92–97  ·  view source on GitHub ↗
(len: usize, alignment: NonZeroUsize)

Source from the content-addressed store, hash-verified

90 /// we should use that. For now we only enforce "not zero" on the type level and the rest during runtime.
91 #[expect(clippy::arc_with_non_send_sync)]
92 pub fn with_alignment(len: usize, alignment: NonZeroUsize) -> Self {
93 Self {
94 data: SharedAllocation(Arc::new(UnsafeCell::new(Allocation::new(len, alignment)))),
95 first_uninit_element: 0,
96 }
97 }
98
99 /// Size of the entire buffer, including the initialized part and the uninitialized part.
100 ///

Callers

nothing calls this directly

Calls 1

SharedAllocationClass · 0.85

Tested by

no test coverage detected