pub struct SingleLayerDataset<L: Layer> {
pub inner: Arc<L>,
pub name: String,
}Expand description
Fields§
§inner: Arc<L>The wrapped layer. Arc so the adapter is cheap to clone and the
closure inside open_layer can hand out a borrowed reference.
name: StringThe synthetic layer name surfaced via Dataset::layer_names.
Default "default".
Implementations§
Trait Implementations§
Source§impl<L: Layer + 'static> Dataset for SingleLayerDataset<L>
impl<L: Layer + 'static> Dataset for SingleLayerDataset<L>
Source§fn layer_names(&self) -> Vec<String>
fn layer_names(&self) -> Vec<String>
Names of the user-facing layers in deterministic order.
Source§fn open_layer<'a>(&'a self, name: &str) -> Result<Box<dyn Layer + 'a>>
fn open_layer<'a>(&'a self, name: &str) -> Result<Box<dyn Layer + 'a>>
Open the layer with the given name. Returns
Error::LayerNotFound if the name isn’t present.Auto Trait Implementations§
impl<L> Freeze for SingleLayerDataset<L>
impl<L> RefUnwindSafe for SingleLayerDataset<L>where
L: RefUnwindSafe,
impl<L> Send for SingleLayerDataset<L>
impl<L> Sync for SingleLayerDataset<L>
impl<L> Unpin for SingleLayerDataset<L>
impl<L> UnsafeUnpin for SingleLayerDataset<L>
impl<L> UnwindSafe for SingleLayerDataset<L>where
L: RefUnwindSafe,
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