pub struct DocStore {
pub entries: Vec<String>,
}Expand description
The engine documentation store: per-symbol Markdown doc text addressed by DocId.
Encoded into a separate engine_docs.bin blob (deliberately not a field of ApiData)
and embedded native-only behind the bundled-docs feature. This keeps the doc prose out of the
engine_api.bin blob the wasm playground fetches — populating the doc: Option<DocId> fields
is a fixed-size change to that blob, so the wasm download never grows with the docs (Playbook
§4.6; crates/gdscript-api/src/lib.rs).
Fields§
§entries: Vec<String>Markdown entries; DocId(i) addresses entries[i]. Every entry is non-empty — a symbol
with no documentation carries doc: None, never an index to an empty string.
Implementations§
Source§impl DocStore
impl DocStore
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, LoadError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, LoadError>
Decode an engine_docs.bin blob produced by xtask codegen-api.
The bytes are copied into a 16-byte-aligned buffer before validation, mirroring
EngineApi::from_bytes, so a misaligned source decodes correctly.
§Errors
Returns LoadError::Decode if the blob fails rkyv validation.
Trait Implementations§
Source§impl Archive for DocStore
impl Archive for DocStore
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§type Archived = ArchivedDocStore
type Archived = ArchivedDocStore
Source§type Resolver = DocStoreResolver
type Resolver = DocStoreResolver
Auto Trait Implementations§
impl Freeze for DocStore
impl RefUnwindSafe for DocStore
impl Send for DocStore
impl Sync for DocStore
impl Unpin for DocStore
impl UnsafeUnpin for DocStore
impl UnwindSafe for DocStore
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.