Struct meshx::attrib::Attribute

source ·
pub struct Attribute<I> {
    pub data: AttributeData,
    /* private fields */
}
Expand description

Mesh attribute with an associated topology I.

This stores values that can be attached to mesh elements.

Fields§

§data: AttributeData

Underlying attribute data.

This can be used to manipulate attribute values or their references directly.

Implementations§

source§

impl<I> Attribute<I>

This type wraps a DataVec to store attribute data. Having the type parameter I allows the compiler verify that attributes are being indexed correctly.

source

pub fn direct_with_size<T: AttributeValue>(n: usize, def: T) -> Self

Construct a direct attribute with a given size.

source

pub fn indirect_with_size<T: AttributeValueHash>(n: usize, def: T) -> Self

Construct an indirect attribute with a given size.

source

pub fn direct_from_vec<T: AttributeValue + Default>(vec: Vec<T>) -> Self

Construct a direct attribute from a given Vec<T> of data reusing the space already allocated by the Vec.

source

pub fn indirect_from_vec<T: AttributeValueHash + Default>( vec: Vec<T>, cache: &mut AttribValueCache ) -> Self

Construct an indirect attribute from a given Vec<T> of data, while saving any repeated values in the given cache.

source

pub fn indirect_from_data(data: IndirectData) -> Self

Construct an indirect attribute from a given IndirectData instance. It is assumed that the included data is already cached correctly in the associated cache.

source

pub fn as_slice<T: Any>(&self) -> Result<&[T], Error>

Produce a slice to the underlying direct attribute data.

source

pub fn as_mut_slice<T: Any>(&mut self) -> Result<&mut [T], Error>

Produce a mutable slice to the underlying direct attribute data.

source

pub fn duplicate_empty(&self) -> Self

Construct a new empty attribute with the same buffer type, default element and topology as self.

source

pub fn duplicate_with( &self, duplicate_data: impl FnOnce(&mut VecDyn<dyn HasAttributeValue>, Slice<'_, dyn HasAttributeValue>) ) -> Self

Construct a new attribute with the same buffer type, default element and topology type as self.

The data within the newly created attribute is expected to be initialized with the given function init, which takes the output DataSliceMut for the new attribute and the existing DataSlice from self.

source

pub fn duplicate_with_len( &self, len: usize, init: impl FnOnce(DataSliceMut<'_>, DataSlice<'_>) ) -> Self

Construct a new attribute with the same buffer type, default element and topology type as self.

The attribute is first initialized with the default value by allocating len default elements. Then the newly created buffer is expected to be modified by the init function.

source

pub fn promote_empty<J>(&self) -> Attribute<J>

Construct a new empty attribute with the same buffer type and default element as self.

In contrast to duplicate_empty this function allows the new attribute to correspond with a different topology.

source

pub fn promote<J>(&self) -> Attribute<J>

Construct a new attribute with the same data and default element as self, but corresponding to a different topology.

source

pub fn promote_into<J>(self) -> Attribute<J>

Construct a new attribute with the same data and default element as self, but corresponding to a different topology.

This function consumes the given attribute.

source

pub fn promote_with<J>( &self, promote_data: impl FnOnce(&mut VecDyn<dyn HasAttributeValue>, Slice<'_, dyn HasAttributeValue>) ) -> Attribute<J>

Construct a new attribute with the same buffer type and default element as self.

source

pub fn promote_with_len<J>( &self, len: usize, init: impl FnOnce(DataSliceMut<'_>, DataSlice<'_>) ) -> Attribute<J>

Construct a new attribute with the same buffer type and default element as self.

The attribute is first initialized with the default value by allocating len default elements. Then the newly created buffer is expected to be modified by the init function.

source

pub fn direct_from_slice<T: AttributeValue + Default>(data: &[T]) -> Self

Construct a direct attribute from a given slice of data, by copying the data.

source

pub fn indirect_from_slice<T: AttributeValueHash + Default>( data: &[T], cache: &mut AttribValueCache ) -> Self

Construct an indirect attribute from a given slice of data, by copying the data.

source

pub fn check<T: Any>(&self) -> Result<&Self, Error>

Get the type data stored within this attribute

source

pub fn check_mut<T: Any>(&mut self) -> Result<&mut Self, Error>

Get the mutable typed data stored within this attribute

source

pub fn iter<'a, T: Any>( &'a self ) -> Result<Box<dyn Iterator<Item = &'a T> + 'a>, Error>

Produce an iterator over the underlying data elements.

source

pub fn direct_iter<T: Any>(&self) -> Result<Iter<'_, T>, Error>

Produce an iterator over the underlying data elements for a direct attribute.

source

pub fn indirect_iter<T: Any>(&self) -> Result<impl Iterator<Item = &T>, Error>

Produce an iterator over the underlying data elements for an indirect attribute.

source

pub fn direct_iter_mut<T: Any>(&mut self) -> Result<IterMut<'_, T>, Error>

Produce a mutable iterator over the underlying data elements for a direct attribute.

source

pub fn indirect_update_with<T, F>( &mut self, f: F, cache: &mut AttribValueCache ) -> Result<&mut Self, Error>
where T: AttributeValueHash, F: FnMut(usize, &Irc<T>) -> Option<Irc<T>>,

Iterate over all the value in this attribute and update them as needed.

This function takes a closure which takes an index and a smart pointer to the stored value and produces an optional new value. The new value is then used to update the attribute using the provided cache.

source

pub fn clone_into_vec<T: AttributeValueHash>(&self) -> Result<Vec<T>, Error>

Convert the data stored by this attribute into a vector of the same size.

source

pub fn direct_clone_into_vec<T: Any + Clone>(&self) -> Result<Vec<T>, Error>

Convert the data stored by this direct attribute into a vector of the same size.

source

pub fn len(&self) -> usize

Number of elements stored by this attribute. This is the same as the number of elements in the associated topology.

source

pub fn is_empty(&self) -> bool

Check if there are any values in this attribute.

source

pub fn data_slice(&self) -> DataSlice<'_>

Get a reference to the internal data as a DataSlice.

source

pub fn data_mut_slice(&mut self) -> DataSliceMut<'_>

Get a mutable reference to the internal data as a DataSliceMut.

source

pub fn into_data(self) -> DataVec

Convert this attribute into the underlying buffer. This consumes the attribute.

source

pub fn extend_by(&mut self, n: usize)

Extend this attribute by n elements. Effectively, this function appends the default element n number of times to this attribute.

source

pub fn rotate_left(&mut self, mid: usize)

Rotate this attribute in-place such that the first mid elements of the underlying buffer move to the end while the last self.len() - mid elements move to the front. After calling rotate_left, the element previously at index mid will become the first element in the slice.

source

pub fn rotate_right(&mut self, k: usize)

Rotate this attribute in-place such that the first self.len() - k elements of the underlying buffer move to the end while the last k elements move to the front. After calling rotate_right, the element previously at index self.len() - k will become the first element in the slice.

source

pub fn default_element(&self) -> ValueRef<'_>

Get a reference to the default element.

source§

impl Attribute<MeshIndex>

source

pub fn get<T: Any + Copy, I: Into<MeshIndex>>(&self, i: I) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<MeshIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<MeshIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<VertexIndex>

source

pub fn get<T: Any + Copy, I: Into<VertexIndex>>(&self, i: I) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<VertexIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<VertexIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<EdgeIndex>

source

pub fn get<T: Any + Copy, I: Into<EdgeIndex>>(&self, i: I) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<EdgeIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<EdgeIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<FaceIndex>

source

pub fn get<T: Any + Copy, I: Into<FaceIndex>>(&self, i: I) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<FaceIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<FaceIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<CellIndex>

source

pub fn get<T: Any + Copy, I: Into<CellIndex>>(&self, i: I) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<CellIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<CellIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<EdgeVertexIndex>

source

pub fn get<T: Any + Copy, I: Into<EdgeVertexIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<EdgeVertexIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<EdgeVertexIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<FaceVertexIndex>

source

pub fn get<T: Any + Copy, I: Into<FaceVertexIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<FaceVertexIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<FaceVertexIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<FaceEdgeIndex>

source

pub fn get<T: Any + Copy, I: Into<FaceEdgeIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<FaceEdgeIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<FaceEdgeIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<CellVertexIndex>

source

pub fn get<T: Any + Copy, I: Into<CellVertexIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<CellVertexIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<CellVertexIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<CellEdgeIndex>

source

pub fn get<T: Any + Copy, I: Into<CellEdgeIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<CellEdgeIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<CellEdgeIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<CellFaceIndex>

source

pub fn get<T: Any + Copy, I: Into<CellFaceIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<CellFaceIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<CellFaceIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<VertexEdgeIndex>

source

pub fn get<T: Any + Copy, I: Into<VertexEdgeIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<VertexEdgeIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<VertexEdgeIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<VertexFaceIndex>

source

pub fn get<T: Any + Copy, I: Into<VertexFaceIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<VertexFaceIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<VertexFaceIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<VertexCellIndex>

source

pub fn get<T: Any + Copy, I: Into<VertexCellIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<VertexCellIndex>>( &self, i: I ) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<VertexCellIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<EdgeFaceIndex>

source

pub fn get<T: Any + Copy, I: Into<EdgeFaceIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<EdgeFaceIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<EdgeFaceIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<EdgeCellIndex>

source

pub fn get<T: Any + Copy, I: Into<EdgeCellIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<EdgeCellIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<EdgeCellIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

source§

impl Attribute<FaceCellIndex>

source

pub fn get<T: Any + Copy, I: Into<FaceCellIndex>>( &self, i: I ) -> Result<T, Error>

Get i’th attribute value.

source

pub fn get_ref<T: Any, I: Into<FaceCellIndex>>(&self, i: I) -> Result<&T, Error>

Get a const reference to the i’th attribute value.

source

pub fn get_mut<T: Any, I: Into<FaceCellIndex>>( &mut self, i: I ) -> Result<&mut T, Error>

Get a mutable reference to the i’th direct attribute value.

This function works only on direct attributes. Indirect attributes cannot be modified via mutable references, since they employ a special caching mechanism which aliases each stored element.

Trait Implementations§

source§

impl<I: Clone> Clone for Attribute<I>

source§

fn clone(&self) -> Attribute<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug> Debug for Attribute<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I: PartialEq> PartialEq for Attribute<I>

source§

fn eq(&self, other: &Attribute<I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<I> StructuralPartialEq for Attribute<I>

Auto Trait Implementations§

§

impl<I> RefUnwindSafe for Attribute<I>
where I: RefUnwindSafe,

§

impl<I> Send for Attribute<I>
where I: Send,

§

impl<I> Sync for Attribute<I>
where I: Sync,

§

impl<I> Unpin for Attribute<I>
where I: Unpin,

§

impl<I> UnwindSafe for Attribute<I>
where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Bytes for T

source§

fn as_bytes(&self) -> &[u8]

Get a slice of bytes representing Self.
source§

fn interpret_bytes(bytes: &[u8]) -> &Self

Panics if the size of the given bytes slice is not equal to the size of Self.
source§

impl<T> CloneBytes for T
where T: Clone + 'static,

source§

unsafe fn clone_bytes(src: &[MaybeUninit<u8>]) -> Box<[MaybeUninit<u8>]>

source§

unsafe fn clone_from_bytes(dst: &mut [MaybeUninit<u8>], src: &[MaybeUninit<u8>])

source§

unsafe fn clone_into_raw_bytes( src: &[MaybeUninit<u8>], dst: &mut [MaybeUninit<u8>] )

source§

impl<T> DebugBytes for T
where T: Debug + 'static,

source§

unsafe fn fmt_bytes( bytes: &[MaybeUninit<u8>], f: &mut Formatter<'_> ) -> Result<(), Error>

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DropBytes for T
where T: 'static,

source§

unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<'a, S, I> Get<'a, I> for S
where I: GetIndex<'a, S>,

§

type Output = <I as GetIndex<'a, S>>::Output

source§

fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>

source§

fn at(&self, idx: I) -> Self::Output

Return a value at the given index. This is provided as the checked version of get that will panic if the equivalent get call is None, which typically means that the given index is out of bounds. Read more
source§

unsafe fn at_unchecked(&self, idx: I) -> Self::Output

Return a value at the given index. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<S, I> Isolate<I> for S
where I: IsolateIndex<S>,

§

type Output = <I as IsolateIndex<S>>::Output

source§

unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output

Unchecked version of isolate. Read more
source§

fn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>

source§

fn isolate(self, idx: I) -> Self::Output
where Self: Sized,

Return a value at the given index. This is provided as the checked version of try_isolate that will panic if the equivalent try_isolate call is None, which typically means that the given index is out of bounds. Read more
source§

impl<T> PartialEqBytes for T
where T: PartialEq + 'static,

source§

unsafe fn eq_bytes(a: &[MaybeUninit<u8>], b: &[MaybeUninit<u8>]) -> bool

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, N> PushArrayToVec<N> for T
where T: Clone, N: Array<T>,

source§

fn push_to_vec(element: <N as Array<T>>::Array, set: &mut Vec<T>)

This method tells this type how it can be pushed to a Vec as an array.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> AttributeValue for T
where T: Clone + PartialEq + Debug + Send + Sync + 'static,

source§

impl<T> Elem for T
where T: Any + DropBytes,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,