pub struct WeightEntry {
pub name: String,
pub shape: Shape,
pub kind: WeightKind,
pub bytes: Arc<[u8]>,
pub refs: AtomicUsize,
}Expand description
One entry in the registry.
Fields§
§name: String§shape: Shape§kind: WeightKind§bytes: Arc<[u8]>Arc so multiple consumers (different graphs / different
LoRA combinations / hot-reload) can hold the same bytes
without copying.
refs: AtomicUsizeRef count. Goes up on pin, down on release. Hitting
zero on release keeps the entry in the registry; explicit
unregister is required to drop. This separation matters
for “weight streaming” use cases that re-pin frequently.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WeightEntry
impl RefUnwindSafe for WeightEntry
impl Send for WeightEntry
impl Sync for WeightEntry
impl Unpin for WeightEntry
impl UnsafeUnpin for WeightEntry
impl UnwindSafe for WeightEntry
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> 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