Skip to Content
VectorLib

Asset

vectorlib::Asset — fields, methods, parameters and return types.


pub struct Asset

A file embedded in the program (LemLib's asset struct).

View source

Methods

Prop

Type

new

pub const fn new(buf: &'static [u8]) -> Self

Wrap embedded bytes. Usually created with asset!(crate::asset!).

Parameters

Prop

Type

Returns

Self

View source

buf

pub const fn buf(&self) -> &'static [u8]

The file contents.

Returns

&'static [u8]

View source

size

pub const fn size(&self) -> usize

The file size in bytes.

Returns

usize

View source

On this page