pub struct ModelEntry {
pub name: String,
pub size: usize,
pub offset: u64,
pub metadata: ModelMetadata,
pub components: Vec<String>,
}Expand description
An entry in the bundle manifest representing a single model.
Fields§
§name: StringModel name (unique identifier within bundle).
size: usizeSize of model data in bytes.
offset: u64Offset in the bundle file.
metadata: ModelMetadataModel metadata.
components: Vec<String>Component names (for paging).
Implementations§
Source§impl ModelEntry
impl ModelEntry
Sourcepub fn with_offset(self, offset: u64) -> Self
pub fn with_offset(self, offset: u64) -> Self
Set the offset in the bundle file.
Sourcepub fn with_metadata(self, metadata: ModelMetadata) -> Self
pub fn with_metadata(self, metadata: ModelMetadata) -> Self
Set metadata.
Sourcepub fn with_component(self, name: impl Into<String>) -> Self
pub fn with_component(self, name: impl Into<String>) -> Self
Add a component name.
Trait Implementations§
Source§impl Clone for ModelEntry
impl Clone for ModelEntry
Source§fn clone(&self) -> ModelEntry
fn clone(&self) -> ModelEntry
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelEntry
impl RefUnwindSafe for ModelEntry
impl Send for ModelEntry
impl Sync for ModelEntry
impl Unpin for ModelEntry
impl UnwindSafe for ModelEntry
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more