pub struct TensorFromSliceWithBuilder<T: HasDType, C: AsRef<[T]>, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with call().
Implementations§
Source§impl<T: HasDType, C: AsRef<[T]>, S: State> TensorFromSliceWithBuilder<T, C, S>
impl<T: HasDType, C: AsRef<[T]>, S: State> TensorFromSliceWithBuilder<T, C, S>
Sourcepub fn call(self) -> Tensorwhere
S: IsComplete,
pub fn call(self) -> Tensorwhere
S: IsComplete,
Finishes building and performs the requested action.
Sourcepub fn source(self, value: C) -> TensorFromSliceWithBuilder<T, C, SetSource<S>>where
S::Source: IsUnset,
pub fn source(self, value: C) -> TensorFromSliceWithBuilder<T, C, SetSource<S>>where
S::Source: IsUnset,
Required.
Sourcepub fn device(
self,
value: DeviceSpec,
) -> TensorFromSliceWithBuilder<T, C, SetDevice<S>>where
S::Device: IsUnset,
pub fn device(
self,
value: DeviceSpec,
) -> TensorFromSliceWithBuilder<T, C, SetDevice<S>>where
S::Device: IsUnset,
Sourcepub fn maybe_device(
self,
value: Option<DeviceSpec>,
) -> TensorFromSliceWithBuilder<T, C, SetDevice<S>>where
S::Device: IsUnset,
pub fn maybe_device(
self,
value: Option<DeviceSpec>,
) -> TensorFromSliceWithBuilder<T, C, SetDevice<S>>where
S::Device: IsUnset,
Auto Trait Implementations§
impl<T, C, S> Freeze for TensorFromSliceWithBuilder<T, C, S>where
C: Freeze,
impl<T, C, S> RefUnwindSafe for TensorFromSliceWithBuilder<T, C, S>where
C: RefUnwindSafe,
impl<T, C, S> Send for TensorFromSliceWithBuilder<T, C, S>where
C: Send,
impl<T, C, S> Sync for TensorFromSliceWithBuilder<T, C, S>where
C: Sync,
impl<T, C, S> Unpin for TensorFromSliceWithBuilder<T, C, S>where
C: Unpin,
impl<T, C, S> UnsafeUnpin for TensorFromSliceWithBuilder<T, C, S>where
C: UnsafeUnpin,
impl<T, C, S> UnwindSafe for TensorFromSliceWithBuilder<T, C, S>where
C: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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