pub struct MappingContext {
pub architecture: Option<Architecture>,
pub format: Option<String>,
pub estimated_params: Option<u64>,
pub metadata: HashMap<String, String>,
}Expand description
Context information for smart tensor mapping
Fields§
§architecture: Option<Architecture>Detected or known architecture
format: Option<String>Model format (SafeTensors, GGUF, etc.)
estimated_params: Option<u64>Model size estimate (helpful for architecture inference)
metadata: HashMap<String, String>Additional metadata from model file
Implementations§
Source§impl MappingContext
impl MappingContext
Sourcepub fn with_architecture(self, arch: Architecture) -> Self
pub fn with_architecture(self, arch: Architecture) -> Self
Set architecture
Sourcepub fn with_format<S: Into<String>>(self, format: S) -> Self
pub fn with_format<S: Into<String>>(self, format: S) -> Self
Set format
Trait Implementations§
Source§impl Clone for MappingContext
impl Clone for MappingContext
Source§fn clone(&self) -> MappingContext
fn clone(&self) -> MappingContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MappingContext
impl Debug for MappingContext
Auto Trait Implementations§
impl Freeze for MappingContext
impl RefUnwindSafe for MappingContext
impl Send for MappingContext
impl Sync for MappingContext
impl Unpin for MappingContext
impl UnwindSafe for MappingContext
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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