pub struct ControlVector { /* private fields */ }Expand description
In-memory native control-vector data and layer contract.
Implementations§
Source§impl ControlVector
impl ControlVector
Sourcepub fn new(
values: Vec<f32>,
embedding_width: u32,
layer_start: i32,
layer_end: i32,
) -> Result<ControlVector, Error>
pub fn new( values: Vec<f32>, embedding_width: u32, layer_start: i32, layer_end: i32, ) -> Result<ControlVector, Error>
Creates a content-bound control vector.
§Errors
Returns an error for non-finite data, invalid dimensions, or a malformed layer range.
Sourcepub const fn specification(&self) -> &ControlVectorSpec
pub const fn specification(&self) -> &ControlVectorSpec
Returns the content-bound application contract.
Trait Implementations§
Source§impl Clone for ControlVector
impl Clone for ControlVector
Source§fn clone(&self) -> ControlVector
fn clone(&self) -> ControlVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§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 ControlVector
impl RefUnwindSafe for ControlVector
impl Send for ControlVector
impl Sync for ControlVector
impl Unpin for ControlVector
impl UnsafeUnpin for ControlVector
impl UnwindSafe for ControlVector
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