Struct hotg_rune_proc_blocks::TensorDescriptors
source · [−]pub struct TensorDescriptors<'a>(pub Cow<'a, [TensorDescriptor<'a>]>);
Tuple Fields
0: Cow<'a, [TensorDescriptor<'a>]>
Methods from Deref<Target = Cow<'a, [TensorDescriptor<'a>]>>
sourcepub fn is_borrowed(&self) -> bool
🔬 This is a nightly-only experimental API. (cow_is_borrowed
)
pub fn is_borrowed(&self) -> bool
cow_is_borrowed
)Returns true if the data is borrowed, i.e. if to_mut
would require additional work.
Examples
#![feature(cow_is_borrowed)]
use std::borrow::Cow;
let cow = Cow::Borrowed("moo");
assert!(cow.is_borrowed());
let bull: Cow<'_, str> = Cow::Owned("...moo?".to_string());
assert!(!bull.is_borrowed());
sourcepub fn is_owned(&self) -> bool
🔬 This is a nightly-only experimental API. (cow_is_borrowed
)
pub fn is_owned(&self) -> bool
cow_is_borrowed
)Returns true if the data is owned, i.e. if to_mut
would be a no-op.
Examples
#![feature(cow_is_borrowed)]
use std::borrow::Cow;
let cow: Cow<'_, str> = Cow::Owned("moo".to_string());
assert!(cow.is_owned());
let bull = Cow::Borrowed("...moo?");
assert!(!bull.is_owned());
Trait Implementations
sourceimpl<'a> Clone for TensorDescriptors<'a>
impl<'a> Clone for TensorDescriptors<'a>
sourcefn clone(&self) -> TensorDescriptors<'a>
fn clone(&self) -> TensorDescriptors<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for TensorDescriptors<'a>
impl<'a> Debug for TensorDescriptors<'a>
sourceimpl<'a> Default for TensorDescriptors<'a>
impl<'a> Default for TensorDescriptors<'a>
sourcefn default() -> TensorDescriptors<'a>
fn default() -> TensorDescriptors<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a> Deref for TensorDescriptors<'a>
impl<'a> Deref for TensorDescriptors<'a>
sourceimpl<'de, 'a> Deserialize<'de> for TensorDescriptors<'a>
impl<'de, 'a> Deserialize<'de> for TensorDescriptors<'a>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> From<TensorDescriptor<'a>> for TensorDescriptors<'a>
impl<'a> From<TensorDescriptor<'a>> for TensorDescriptors<'a>
sourcefn from(t: TensorDescriptor<'a>) -> Self
fn from(t: TensorDescriptor<'a>) -> Self
Performs the conversion.
sourceimpl<'a> FromIterator<TensorDescriptor<'a>> for TensorDescriptors<'a>
impl<'a> FromIterator<TensorDescriptor<'a>> for TensorDescriptors<'a>
sourcefn from_iter<T: IntoIterator<Item = TensorDescriptor<'a>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = TensorDescriptor<'a>>>(iter: T) -> Self
Creates a value from an iterator. Read more
sourceimpl<'a> PartialEq<TensorDescriptors<'a>> for TensorDescriptors<'a>
impl<'a> PartialEq<TensorDescriptors<'a>> for TensorDescriptors<'a>
sourcefn eq(&self, other: &TensorDescriptors<'a>) -> bool
fn eq(&self, other: &TensorDescriptors<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TensorDescriptors<'a>) -> bool
fn ne(&self, other: &TensorDescriptors<'a>) -> bool
This method tests for !=
.
sourceimpl<'a> Serialize for TensorDescriptors<'a>
impl<'a> Serialize for TensorDescriptors<'a>
impl<'a> StructuralPartialEq for TensorDescriptors<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for TensorDescriptors<'a>
impl<'a> Send for TensorDescriptors<'a>
impl<'a> Sync for TensorDescriptors<'a>
impl<'a> Unpin for TensorDescriptors<'a>
impl<'a> UnwindSafe for TensorDescriptors<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more