pub trait ModuleMut<Input> {
type Output;
type Error: Debug;
// Required method
fn try_forward_mut(
&mut self,
input: Input
) -> Result<Self::Output, Self::Error>;
// Provided method
fn forward_mut(&mut self, input: Input) -> Self::Output { ... }
}
Expand description
Mutable forward of Input
that produces ModuleMut::Output.
See Module for immutable forward.
Required Associated Types§
Required Methods§
fn try_forward_mut(&mut self, input: Input) -> Result<Self::Output, Self::Error>
Provided Methods§
sourcefn forward_mut(&mut self, input: Input) -> Self::Output
fn forward_mut(&mut self, input: Input) -> Self::Output
Forward Input
through the module and produce ModuleMut::Output.
See Module::forward() for immutable version
Implementations on Foreign Types§
source§impl<Input, M5: ModuleMut<M4::Output, Error = M4::Error>, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4, M5)
impl<Input, M5: ModuleMut<M4::Output, Error = M4::Error>, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4, M5)
source§fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
Calls forward sequentially on each module in the tuple.
type Output = <M5 as ModuleMut<<M4 as ModuleMut<<M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Output>>::Output>>::Output
type Error = <M5 as ModuleMut<<M4 as ModuleMut<<M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Output>>::Output>>::Error
source§impl<Input, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3)
impl<Input, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3)
source§fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
Calls forward sequentially on each module in the tuple.
type Output = <M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Output
type Error = <M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Error
source§impl<Input, M6: ModuleMut<M5::Output, Error = M5::Error>, M5: ModuleMut<M4::Output, Error = M4::Error>, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4, M5, M6)
impl<Input, M6: ModuleMut<M5::Output, Error = M5::Error>, M5: ModuleMut<M4::Output, Error = M4::Error>, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4, M5, M6)
source§fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
Calls forward sequentially on each module in the tuple.
type Output = <M6 as ModuleMut<<M5 as ModuleMut<<M4 as ModuleMut<<M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Output>>::Output>>::Output>>::Output
type Error = <M6 as ModuleMut<<M5 as ModuleMut<<M4 as ModuleMut<<M3 as ModuleMut<<M2 as ModuleMut<<M1 as ModuleMut<Input>>::Output>>::Output>>::Output>>::Output>>::Output>>::Error
source§impl<Input, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2)
impl<Input, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2)
source§impl<Input, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4)
impl<Input, M4: ModuleMut<M3::Output, Error = M3::Error>, M3: ModuleMut<M2::Output, Error = M2::Error>, M2: ModuleMut<M1::Output, Error = M1::Error>, M1: ModuleMut<Input>> ModuleMut<Input> for (M1, M2, M3, M4)
source§fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
fn try_forward_mut(&mut self, x: Input) -> Result<Self::Output, Self::Error>
Calls forward sequentially on each module in the tuple.