#[repr(C)]pub struct WeakStr<Alloc: IAlloc = DefaultAllocator> { /* private fields */ }Expand description
A weak reference counted boxed string.
Implementations§
Source§impl<Alloc: IAlloc> WeakStr<Alloc>
impl<Alloc: IAlloc> WeakStr<Alloc>
Sourcepub const fn has_optimal_layout() -> bool
pub const fn has_optimal_layout() -> bool
Returns true if the layout for WeakStr is smaller or equal to that Rust would have generated for it.
Trait Implementations§
Source§impl<Alloc: IAlloc> IStable for WeakStr<Alloc>
impl<Alloc: IAlloc> IStable for WeakStr<Alloc>
Source§const REPORT: &'static TypeReport
const REPORT: &'static TypeReport
A compile-time generated report of the fields of the type, allowing for compatibility inspection.
Source§const ID: u64
const ID: u64
A stable (and ideally unique) identifier for the type. Often generated using
crate::report::gen_id, but can be manually set.Source§type ForbiddenValues = <Struct<WeakSlice<u8, Alloc>> as IStable>::ForbiddenValues
type ForbiddenValues = <Struct<WeakSlice<u8, Alloc>> as IStable>::ForbiddenValues
The values that the annotated type cannot occupy.
Source§type UnusedBits = <Struct<WeakSlice<u8, Alloc>> as IStable>::UnusedBits
type UnusedBits = <Struct<WeakSlice<u8, Alloc>> as IStable>::UnusedBits
The padding bits in the annotated types
Source§type Size = <Struct<WeakSlice<u8, Alloc>> as IStable>::Size
type Size = <Struct<WeakSlice<u8, Alloc>> as IStable>::Size
The size of the annotated type in bytes.
Source§type Align = <Struct<WeakSlice<u8, Alloc>> as IStable>::Align
type Align = <Struct<WeakSlice<u8, Alloc>> as IStable>::Align
The alignment of the annotated type in bytes.
Source§type HasExactlyOneNiche = <Struct<WeakSlice<u8, Alloc>> as IStable>::HasExactlyOneNiche
type HasExactlyOneNiche = <Struct<WeakSlice<u8, Alloc>> as IStable>::HasExactlyOneNiche
Allows the detection of whether or not
core::option::Options are stable: Read moreSource§type ContainsIndirections = <Struct<WeakSlice<u8, Alloc>> as IStable>::ContainsIndirections
type ContainsIndirections = <Struct<WeakSlice<u8, Alloc>> as IStable>::ContainsIndirections
Whether or not the type contains indirections (pointers, indices in independent data-structures…)
Auto Trait Implementations§
impl<Alloc> Freeze for WeakStr<Alloc>
impl<Alloc> RefUnwindSafe for WeakStr<Alloc>where
Alloc: RefUnwindSafe,
impl<Alloc> Send for WeakStr<Alloc>
impl<Alloc> Sync for WeakStr<Alloc>
impl<Alloc> Unpin for WeakStr<Alloc>
impl<Alloc> UnwindSafe for WeakStr<Alloc>where
Alloc: UnwindSafe,
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more