MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / shared_ref

Method shared_ref

crates/data-structures/src/slim_slice.rs:338–342  ·  view source on GitHub ↗
(&'a self)

Source from the content-addressed store, hash-verified

336 #[allow(clippy::needless_lifetimes)]
337 #[inline]
338 pub fn shared_ref<'a>(&'a self) -> &'a SlimSlice<'a, T> {
339 // SAFETY: The reference lives as long as `self`.
340 // By virtue of `repr(transparent)` we're also allowed these reference casts.
341 unsafe { mem::transmute(self) }
342 }
343
344 /// Returns a limited mutable slice to this boxed slice.
345 #[allow(clippy::needless_lifetimes)]

Callers 3

derefMethod · 0.80
str_shared_ref_variousFunction · 0.80
slice_shared_ref_variousFunction · 0.80

Calls

no outgoing calls

Tested by 2

str_shared_ref_variousFunction · 0.64
slice_shared_ref_variousFunction · 0.64