pub struct ChainAdapter { /* private fields */ }Expand description
Adapter that applies two adapters in sequence.
This allows composing smaller adapters instead of creating one large monolithic adapter.
Implementations§
Source§impl ChainAdapter
impl ChainAdapter
Sourcepub fn new<A, B>(first: A, second: B) -> Selfwhere
A: ModuleAdapter + 'static,
B: ModuleAdapter + 'static,
pub fn new<A, B>(first: A, second: B) -> Selfwhere
A: ModuleAdapter + 'static,
B: ModuleAdapter + 'static,
Create a new adapter chain.
Trait Implementations§
Source§impl Clone for ChainAdapter
impl Clone for ChainAdapter
Source§fn clone(&self) -> ChainAdapter
fn clone(&self) -> ChainAdapter
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 moreSource§impl ModuleAdapter for ChainAdapter
impl ModuleAdapter for ChainAdapter
Source§fn adapt(&self, snapshot: &TensorSnapshot) -> TensorSnapshot
fn adapt(&self, snapshot: &TensorSnapshot) -> TensorSnapshot
Adapt a tensor snapshot based on its container type and parameter name
Source§fn get_alternative_param_name(
&self,
param_name: &str,
container_type: &str,
) -> Option<String>
fn get_alternative_param_name( &self, param_name: &str, container_type: &str, ) -> Option<String>
Get alternative parameter name to try during matching Read more
Source§fn clone_box(&self) -> Box<dyn ModuleAdapter>
fn clone_box(&self) -> Box<dyn ModuleAdapter>
Clone the adapter into a boxed trait object
Source§fn chain<A>(self, next: A) -> ChainAdapterwhere
Self: Sized + 'static,
A: ModuleAdapter + 'static,
fn chain<A>(self, next: A) -> ChainAdapterwhere
Self: Sized + 'static,
A: ModuleAdapter + 'static,
Auto Trait Implementations§
impl Freeze for ChainAdapter
impl !RefUnwindSafe for ChainAdapter
impl Send for ChainAdapter
impl Sync for ChainAdapter
impl Unpin for ChainAdapter
impl UnsafeUnpin for ChainAdapter
impl !UnwindSafe for ChainAdapter
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