mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Some fixup for the documentation
This commit is contained in:
parent
304b0e7b0e
commit
2c0fc29c5c
3 changed files with 6 additions and 5 deletions
|
@ -8,7 +8,7 @@ use core::pin::Pin;
|
|||
#[doc(inline)]
|
||||
pub use const_field_offset_macro::FieldOffsets;
|
||||
|
||||
pub use field_offset::*;
|
||||
pub use field_offset::{AllowPin, FieldOffset, NotPinned};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
@ -155,6 +155,7 @@ union TransmutePinFlag<Container, Field, PinFlag> {
|
|||
y: FieldOffset<Container, Field>,
|
||||
}
|
||||
|
||||
/// Helper class used as the result of the addition of two stype that implement the `ConstFieldOffset` trait
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct ConstFieldOffsetSum<A: ConstFieldOffset, B: ConstFieldOffset>(pub A, pub B);
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ use triomphe::{Arc, HeaderWithLength, ThinArc};
|
|||
|
||||
#[derive(Clone)]
|
||||
#[repr(C)]
|
||||
/// SharedArray holds a reference-counted read-only copy of [T].
|
||||
/// SharedArray holds a reference-counted read-only copy of `[T]`.
|
||||
pub struct SharedArray<T: 'static> {
|
||||
/// Invariant: The usize header is the `len` of the vector, the contained buffer is [T]
|
||||
/// Invariant: The usize header is the `len` of the vector, the contained buffer is `[T]`
|
||||
inner: ThinArc<usize, MaybeUninit<T>>,
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ use triomphe::{Arc, HeaderWithLength, ThinArc};
|
|||
#[derive(Clone)]
|
||||
#[repr(C)]
|
||||
pub struct SharedString {
|
||||
/// Invariant: The usize header is the `len` of the vector, the contained buffer is [MaybeUninit<u8>]
|
||||
/// buffer[0..=len] is initialized and valid utf8, and buffer[len] is '\0'
|
||||
/// Invariant: The usize header is the `len` of the vector, the contained buffer is `[MaybeUninit<u8>]`
|
||||
/// `buffer[0..=len]` is initialized and valid utf8, and `buffer[len]` is '\0'
|
||||
inner: ThinArc<usize, MaybeUninit<u8>>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue