pub trait AsRef<T>where
T: ?Sized,{
// Required method
fn as_ref(&self) -> &T;
}
std
only.Expand description
Used to do a cheap reference-to-reference conversion.
This trait is similar to AsMut
which is used for converting between mutable references.
If you need to do a costly conversion it is better to implement From
with type
&T
or write a custom function.
§Relation to Borrow
AsRef
has the same signature as Borrow
, but Borrow
is different in a few aspects:
- Unlike
AsRef
,Borrow
has a blanket impl for anyT
, and can be used to accept either a reference or a value. (See also note onAsRef
’s reflexibility below.) Borrow
also requires thatHash
,Eq
andOrd
for a borrowed value are equivalent to those of the owned value. For this reason, if you want to borrow only a single field of a struct you can implementAsRef
, but notBorrow
.
Note: This trait must not fail. If the conversion can fail, use a
dedicated method which returns an Option<T>
or a Result<T, E>
.
§Generic Implementations
AsRef
auto-dereferences if the inner type is a reference or a mutable reference
(e.g.: foo.as_ref()
will work the same if foo
has type &mut Foo
or &&mut Foo
).
Note that due to historic reasons, the above currently does not hold generally for all
dereferenceable types, e.g. foo.as_ref()
will not work the same as
Box::new(foo).as_ref()
. Instead, many smart pointers provide an as_ref
implementation which
simply returns a reference to the pointed-to value (but do not perform a cheap
reference-to-reference conversion for that value). However, AsRef::as_ref
should not be
used for the sole purpose of dereferencing; instead ‘Deref
coercion’ can be used:
let x = Box::new(5i32);
// Avoid this:
// let y: &i32 = x.as_ref();
// Better just write:
let y: &i32 = &x;
Types which implement Deref
should consider implementing AsRef<T>
as follows:
impl<T> AsRef<T> for SomeType
where
T: ?Sized,
<SomeType as Deref>::Target: AsRef<T>,
{
fn as_ref(&self) -> &T {
self.deref().as_ref()
}
}
§Reflexivity
Ideally, AsRef
would be reflexive, i.e. there would be an impl<T: ?Sized> AsRef<T> for T
with as_ref
simply returning its argument unchanged.
Such a blanket implementation is currently not provided due to technical restrictions of
Rust’s type system (it would be overlapping with another existing blanket implementation for
&T where T: AsRef<U>
which allows AsRef
to auto-dereference, see “Generic Implementations”
above).
A trivial implementation of AsRef<T> for T
must be added explicitly for a particular type T
where needed or desired. Note, however, that not all types from std
contain such an
implementation, and those cannot be added by external code due to orphan rules.
§Examples
By using trait bounds we can accept arguments of different types as long as they can be
converted to the specified type T
.
For example: By creating a generic function that takes an AsRef<str>
we express that we
want to accept all references that can be converted to &str
as an argument.
Since both String
and &str
implement AsRef<str>
we can accept both as input argument.
fn is_hello<T: AsRef<str>>(s: T) {
assert_eq!("hello", s.as_ref());
}
let s = "hello";
is_hello(s);
let s = "hello".to_string();
is_hello(s);
Required Methods§
Implementors§
impl AsRef<str> for str
impl AsRef<str> for devela::all::String
impl AsRef<str> for PyBackedStr
impl AsRef<str> for ArchivedString
impl AsRef<str> for Field
impl AsRef<LocalWaker> for Waker
impl AsRef<Path> for Cow<'_, OsStr>
impl AsRef<Path> for Component<'_>
impl AsRef<Path> for str
impl AsRef<Path> for devela::all::IterPath<'_>
impl AsRef<Path> for Components<'_>
impl AsRef<Path> for Path
impl AsRef<Path> for PathBuf
impl AsRef<Path> for devela::all::String
impl AsRef<Path> for OsStr
impl AsRef<Path> for OsString
impl AsRef<Path> for DecInt
impl AsRef<CStr> for CStr
impl AsRef<CStr> for CString
impl AsRef<CStr> for ArchivedCString
impl AsRef<OsStr> for Component<'_>
impl AsRef<OsStr> for str
impl AsRef<OsStr> for devela::all::IterPath<'_>
impl AsRef<OsStr> for Components<'_>
impl AsRef<OsStr> for Path
impl AsRef<OsStr> for PathBuf
impl AsRef<OsStr> for devela::all::String
impl AsRef<OsStr> for OsStr
impl AsRef<OsStr> for OsString
impl AsRef<ContentStyle> for ContentStyle
impl AsRef<Collator> for Collator
impl AsRef<DateTimeFormat> for DateTimeFormat
impl AsRef<NumberFormat> for NumberFormat
impl AsRef<PluralRules> for PluralRules
impl AsRef<RelativeTimeFormat> for RelativeTimeFormat
impl AsRef<CompileError> for CompileError
impl AsRef<Exception> for Exception
impl AsRef<Global> for Global
impl AsRef<Instance> for Instance
impl AsRef<LinkError> for LinkError
impl AsRef<Memory> for Memory
impl AsRef<Module> for Module
impl AsRef<RuntimeError> for RuntimeError
impl AsRef<Table> for Table
impl AsRef<Tag> for Tag
impl AsRef<Array> for devela::_dep::js_sys::Array
impl AsRef<ArrayBuffer> for ArrayBuffer
impl AsRef<AsyncIterator> for AsyncIterator
impl AsRef<BigInt64Array> for BigInt64Array
impl AsRef<BigInt> for BigInt
impl AsRef<BigUint64Array> for BigUint64Array
impl AsRef<Boolean> for Boolean
impl AsRef<DataView> for DataView
impl AsRef<Date> for Date
impl AsRef<Error> for CompileError
impl AsRef<Error> for LinkError
impl AsRef<Error> for RuntimeError
impl AsRef<Error> for Error
impl AsRef<Error> for EvalError
impl AsRef<Error> for RangeError
impl AsRef<Error> for ReferenceError
impl AsRef<Error> for SyntaxError
impl AsRef<Error> for TypeError
impl AsRef<Error> for UriError
impl AsRef<EvalError> for EvalError
impl AsRef<Float32Array> for Float32Array
impl AsRef<Float64Array> for Float64Array
impl AsRef<Function> for Function
impl AsRef<Generator> for Generator
impl AsRef<Int8Array> for Int8Array
impl AsRef<Int16Array> for Int16Array
impl AsRef<Int32Array> for Int32Array
impl AsRef<Iterator> for Iterator
impl AsRef<IteratorNext> for IteratorNext
impl AsRef<JsString> for JsString
impl AsRef<Map> for Map
impl AsRef<Number> for Number
impl AsRef<Object> for Collator
impl AsRef<Object> for DateTimeFormat
impl AsRef<Object> for NumberFormat
impl AsRef<Object> for PluralRules
impl AsRef<Object> for RelativeTimeFormat
impl AsRef<Object> for Exception
impl AsRef<Object> for Global
impl AsRef<Object> for Instance
impl AsRef<Object> for Memory
impl AsRef<Object> for Module
impl AsRef<Object> for Table
impl AsRef<Object> for Tag
impl AsRef<Object> for devela::_dep::js_sys::Array
impl AsRef<Object> for ArrayBuffer
impl AsRef<Object> for BigInt64Array
impl AsRef<Object> for BigInt
impl AsRef<Object> for BigUint64Array
impl AsRef<Object> for Boolean
impl AsRef<Object> for DataView
impl AsRef<Object> for Date
impl AsRef<Object> for Error
impl AsRef<Object> for EvalError
impl AsRef<Object> for Float32Array
impl AsRef<Object> for Float64Array
impl AsRef<Object> for Function
impl AsRef<Object> for Generator
impl AsRef<Object> for Int8Array
impl AsRef<Object> for Int16Array
impl AsRef<Object> for Int32Array
impl AsRef<Object> for IteratorNext
impl AsRef<Object> for JsString
impl AsRef<Object> for Map
impl AsRef<Object> for Number
impl AsRef<Object> for Object
impl AsRef<Object> for Promise
impl AsRef<Object> for RangeError
impl AsRef<Object> for ReferenceError
impl AsRef<Object> for RegExp
impl AsRef<Object> for Set
impl AsRef<Object> for SyntaxError
impl AsRef<Object> for TypeError
impl AsRef<Object> for Uint8Array
impl AsRef<Object> for Uint8ClampedArray
impl AsRef<Object> for Uint16Array
impl AsRef<Object> for Uint32Array
impl AsRef<Object> for UriError
impl AsRef<Object> for WeakMap
impl AsRef<Object> for WeakSet
impl AsRef<Promise> for Promise
impl AsRef<Proxy> for Proxy
impl AsRef<RangeError> for RangeError
impl AsRef<ReferenceError> for ReferenceError
impl AsRef<RegExp> for RegExp
impl AsRef<Set> for Set
impl AsRef<Symbol> for Symbol
impl AsRef<SyntaxError> for SyntaxError
impl AsRef<TypeError> for TypeError
impl AsRef<Uint8Array> for Uint8Array
impl AsRef<Uint8ClampedArray> for Uint8ClampedArray
impl AsRef<Uint16Array> for Uint16Array
impl AsRef<Uint32Array> for Uint32Array
impl AsRef<UriError> for UriError
impl AsRef<WeakMap> for WeakMap
impl AsRef<WeakSet> for WeakSet
impl AsRef<Path> for Cow<'_, OsStr>
impl AsRef<Path> for str
impl AsRef<Path> for Path
impl AsRef<Path> for PathBuf
impl AsRef<Path> for devela::all::String
impl AsRef<Path> for OsStr
impl AsRef<Path> for OsString
impl AsRef<PyAny> for CancelledError
impl AsRef<PyAny> for IncompleteReadError
impl AsRef<PyAny> for InvalidStateError
impl AsRef<PyAny> for LimitOverrunError
impl AsRef<PyAny> for QueueEmpty
impl AsRef<PyAny> for QueueFull
impl AsRef<PyAny> for TimeoutError
impl AsRef<PyAny> for gaierror
impl AsRef<PyAny> for herror
impl AsRef<PyAny> for timeout
impl AsRef<PyAny> for PyArithmeticError
impl AsRef<PyAny> for PyAssertionError
impl AsRef<PyAny> for PyAttributeError
impl AsRef<PyAny> for PyBaseException
impl AsRef<PyAny> for PyBlockingIOError
impl AsRef<PyAny> for PyBrokenPipeError
impl AsRef<PyAny> for PyBufferError
impl AsRef<PyAny> for PyBytesWarning
impl AsRef<PyAny> for PyChildProcessError
impl AsRef<PyAny> for PyConnectionAbortedError
impl AsRef<PyAny> for PyConnectionError
impl AsRef<PyAny> for PyConnectionRefusedError
impl AsRef<PyAny> for PyConnectionResetError
impl AsRef<PyAny> for PyDeprecationWarning
impl AsRef<PyAny> for PyEOFError
impl AsRef<PyAny> for PyEncodingWarning
impl AsRef<PyAny> for PyEnvironmentError
impl AsRef<PyAny> for PyException
impl AsRef<PyAny> for PyFileExistsError
impl AsRef<PyAny> for PyFileNotFoundError
impl AsRef<PyAny> for PyFloatingPointError
impl AsRef<PyAny> for PyFutureWarning
impl AsRef<PyAny> for PyGeneratorExit
impl AsRef<PyAny> for PyIOError
impl AsRef<PyAny> for PyImportError
impl AsRef<PyAny> for PyImportWarning
impl AsRef<PyAny> for PyIndexError
impl AsRef<PyAny> for PyInterruptedError
impl AsRef<PyAny> for PyIsADirectoryError
impl AsRef<PyAny> for PyKeyError
impl AsRef<PyAny> for PyKeyboardInterrupt
impl AsRef<PyAny> for PyLookupError
impl AsRef<PyAny> for PyMemoryError
impl AsRef<PyAny> for PyModuleNotFoundError
impl AsRef<PyAny> for PyNameError
impl AsRef<PyAny> for PyNotADirectoryError
impl AsRef<PyAny> for PyNotImplementedError
impl AsRef<PyAny> for PyOSError
impl AsRef<PyAny> for PyOverflowError
impl AsRef<PyAny> for PyPendingDeprecationWarning
impl AsRef<PyAny> for PyPermissionError
impl AsRef<PyAny> for PyProcessLookupError
impl AsRef<PyAny> for PyRecursionError
impl AsRef<PyAny> for PyReferenceError
impl AsRef<PyAny> for PyResourceWarning
impl AsRef<PyAny> for PyRuntimeError
impl AsRef<PyAny> for PyRuntimeWarning
impl AsRef<PyAny> for PyStopAsyncIteration
impl AsRef<PyAny> for PyStopIteration
impl AsRef<PyAny> for PySyntaxError
impl AsRef<PyAny> for PySyntaxWarning
impl AsRef<PyAny> for PySystemError
impl AsRef<PyAny> for PySystemExit
impl AsRef<PyAny> for PyTimeoutError
impl AsRef<PyAny> for PyTypeError
impl AsRef<PyAny> for PyUnboundLocalError
impl AsRef<PyAny> for PyUnicodeDecodeError
impl AsRef<PyAny> for PyUnicodeEncodeError
impl AsRef<PyAny> for PyUnicodeError
impl AsRef<PyAny> for PyUnicodeTranslateError
impl AsRef<PyAny> for PyUnicodeWarning
impl AsRef<PyAny> for PyUserWarning
impl AsRef<PyAny> for PyValueError
impl AsRef<PyAny> for PyWarning
impl AsRef<PyAny> for PyZeroDivisionError
impl AsRef<PyAny> for PanicException
impl AsRef<PyAny> for PyBool
impl AsRef<PyAny> for PyByteArray
impl AsRef<PyAny> for PyBytes
impl AsRef<PyAny> for PyCFunction
impl AsRef<PyAny> for PyCapsule
impl AsRef<PyAny> for PyCode
impl AsRef<PyAny> for PyComplex
impl AsRef<PyAny> for PyDate
impl AsRef<PyAny> for PyDateTime
impl AsRef<PyAny> for PyDelta
impl AsRef<PyAny> for PyDict
impl AsRef<PyAny> for PyDictItems
impl AsRef<PyAny> for PyDictKeys
impl AsRef<PyAny> for PyDictValues
impl AsRef<PyAny> for PyEllipsis
impl AsRef<PyAny> for PyFloat
impl AsRef<PyAny> for PyFrame
impl AsRef<PyAny> for PyFrozenSet
impl AsRef<PyAny> for PyFunction
impl AsRef<PyAny> for PyInt
impl AsRef<PyAny> for PyIterator
impl AsRef<PyAny> for PyList
impl AsRef<PyAny> for PyMapping
impl AsRef<PyAny> for PyMappingProxy
impl AsRef<PyAny> for PyMemoryView
impl AsRef<PyAny> for PyModule
impl AsRef<PyAny> for PyNone
impl AsRef<PyAny> for PyNotImplemented
impl AsRef<PyAny> for PySequence
impl AsRef<PyAny> for PySet
impl AsRef<PyAny> for PySlice
impl AsRef<PyAny> for PyString
impl AsRef<PyAny> for PySuper
impl AsRef<PyAny> for PyTime
impl AsRef<PyAny> for PyTraceback
impl AsRef<PyAny> for PyTuple
impl AsRef<PyAny> for PyType
impl AsRef<PyAny> for PyTzInfo
impl AsRef<PyAny> for PyWeakref
impl AsRef<PyAny> for PyWeakrefProxy
impl AsRef<PyAny> for PyWeakrefReference
impl AsRef<JsValue> for Collator
impl AsRef<JsValue> for DateTimeFormat
impl AsRef<JsValue> for NumberFormat
impl AsRef<JsValue> for PluralRules
impl AsRef<JsValue> for RelativeTimeFormat
impl AsRef<JsValue> for CompileError
impl AsRef<JsValue> for Exception
impl AsRef<JsValue> for Global
impl AsRef<JsValue> for Instance
impl AsRef<JsValue> for LinkError
impl AsRef<JsValue> for Memory
impl AsRef<JsValue> for Module
impl AsRef<JsValue> for RuntimeError
impl AsRef<JsValue> for Table
impl AsRef<JsValue> for Tag
impl AsRef<JsValue> for devela::_dep::js_sys::Array
impl AsRef<JsValue> for ArrayBuffer
impl AsRef<JsValue> for AsyncIterator
impl AsRef<JsValue> for BigInt64Array
impl AsRef<JsValue> for BigInt
impl AsRef<JsValue> for BigUint64Array
impl AsRef<JsValue> for Boolean
impl AsRef<JsValue> for DataView
impl AsRef<JsValue> for Date
impl AsRef<JsValue> for Error
impl AsRef<JsValue> for EvalError
impl AsRef<JsValue> for Float32Array
impl AsRef<JsValue> for Float64Array
impl AsRef<JsValue> for Function
impl AsRef<JsValue> for Generator
impl AsRef<JsValue> for Int8Array
impl AsRef<JsValue> for Int16Array
impl AsRef<JsValue> for Int32Array
impl AsRef<JsValue> for Iterator
impl AsRef<JsValue> for IteratorNext
impl AsRef<JsValue> for JsString
impl AsRef<JsValue> for Map
impl AsRef<JsValue> for Number
impl AsRef<JsValue> for Object
impl AsRef<JsValue> for Promise
impl AsRef<JsValue> for Proxy
impl AsRef<JsValue> for RangeError
impl AsRef<JsValue> for ReferenceError
impl AsRef<JsValue> for RegExp
impl AsRef<JsValue> for Set
impl AsRef<JsValue> for Symbol
impl AsRef<JsValue> for SyntaxError
impl AsRef<JsValue> for TypeError
impl AsRef<JsValue> for Uint8Array
impl AsRef<JsValue> for Uint8ClampedArray
impl AsRef<JsValue> for Uint16Array
impl AsRef<JsValue> for Uint32Array
impl AsRef<JsValue> for UriError
impl AsRef<JsValue> for WeakMap
impl AsRef<JsValue> for WeakSet
impl AsRef<JsValue> for JsValue
impl AsRef<BStr> for str
impl AsRef<BStr> for [u8]
impl AsRef<Bytes> for str
impl AsRef<Bytes> for [u8]
impl AsRef<[f32; 2]> for Vec2
impl AsRef<[f32; 3]> for Vec3A
impl AsRef<[f32; 3]> for Vec3
impl AsRef<[f32; 4]> for Mat2
impl AsRef<[f32; 4]> for Quat
impl AsRef<[f32; 4]> for Vec4
impl AsRef<[f32; 9]> for Mat3
impl AsRef<[f32; 16]> for Mat4
impl AsRef<[f64; 2]> for DVec2
impl AsRef<[f64; 3]> for DVec3
impl AsRef<[f64; 4]> for DMat2
impl AsRef<[f64; 4]> for DQuat
impl AsRef<[f64; 4]> for DVec4
impl AsRef<[f64; 9]> for DMat3
impl AsRef<[f64; 16]> for DMat4
impl AsRef<[i8; 2]> for I8Vec2
impl AsRef<[i8; 3]> for I8Vec3
impl AsRef<[i8; 4]> for I8Vec4
impl AsRef<[i16; 2]> for I16Vec2
impl AsRef<[i16; 3]> for I16Vec3
impl AsRef<[i16; 4]> for I16Vec4
impl AsRef<[i32; 2]> for IVec2
impl AsRef<[i32; 3]> for IVec3
impl AsRef<[i32; 4]> for IVec4
impl AsRef<[i64; 2]> for I64Vec2
impl AsRef<[i64; 3]> for I64Vec3
impl AsRef<[i64; 4]> for I64Vec4
impl AsRef<[u8; 2]> for U8Vec2
impl AsRef<[u8; 3]> for U8Vec3
impl AsRef<[u8; 4]> for U8Vec4
impl AsRef<[u8]> for str
impl AsRef<[u8]> for devela::all::String
impl AsRef<[u8]> for PyBackedBytes
impl AsRef<[u8]> for PyBackedStr
impl AsRef<[u8]> for BStr
impl AsRef<[u8]> for devela::_dep::winnow::Bytes
impl AsRef<[u8]> for Bytes
impl AsRef<[u8]> for BytesMut
impl AsRef<[u16; 2]> for U16Vec2
impl AsRef<[u16; 3]> for U16Vec3
impl AsRef<[u16; 4]> for U16Vec4
impl AsRef<[u32; 2]> for UVec2
impl AsRef<[u32; 3]> for UVec3
impl AsRef<[u32; 4]> for UVec4
impl AsRef<[u64; 2]> for U64Vec2
impl AsRef<[u64; 3]> for U64Vec3
impl AsRef<[u64; 4]> for U64Vec4
impl<'a> AsRef<str> for devela::_dep::_alloc::string::Drain<'a>
impl<'a> AsRef<[u8]> for devela::_dep::_alloc::string::Drain<'a>
impl<'a, T> AsRef<T> for devela::_dep::bumpalo::boxed::Box<'a, T>where
T: ?Sized,
impl<'a, T, A> AsRef<[T]> for devela::_dep::_alloc::vec::Drain<'a, T, A>where
A: Allocator,
impl<'bump> AsRef<str> for devela::_dep::bumpalo::collections::String<'bump>
impl<'bump> AsRef<[u8]> for devela::_dep::bumpalo::collections::String<'bump>
impl<'bump, T> AsRef<[T]> for devela::_dep::bumpalo::collections::Vec<'bump, T>where
T: 'bump,
impl<'bump, T> AsRef<Vec<'bump, T>> for devela::_dep::bumpalo::collections::Vec<'bump, T>where
T: 'bump,
impl<'py, T> AsRef<Bound<'py, PyAny>> for Bound<'py, T>
impl<A> AsRef<[<A as Array>::Item]> for SmallVec<A>where
A: Array,
impl<D> AsRef<ContentStyle> for StyledContent<D>where
D: Display,
impl<I> AsRef<I> for LocatingSlice<I>
impl<I, S> AsRef<I> for Stateful<I, S>
impl<L, R> AsRef<str> for Either<L, R>
impl<L, R, Target> AsRef<[Target]> for Either<L, R>
impl<L, R, Target> AsRef<Target> for Either<L, R>
impl<T> AsRef<[T; 2]> for Point2<T>
impl<T> AsRef<[T; 2]> for Vector2<T>
impl<T> AsRef<[T; 3]> for Point3<T>
impl<T> AsRef<[T; 3]> for Vector3<T>
impl<T> AsRef<[T; 4]> for ColumnMatrix2<T>
impl<T> AsRef<[T; 4]> for Quaternion<T>
impl<T> AsRef<[T; 4]> for RowMatrix2<T>
impl<T> AsRef<[T; 4]> for Vector4<T>
impl<T> AsRef<[T; 6]> for ColumnMatrix2x3<T>
impl<T> AsRef<[T; 6]> for ColumnMatrix3x2<T>
impl<T> AsRef<[T; 6]> for RowMatrix2x3<T>
impl<T> AsRef<[T; 6]> for RowMatrix3x2<T>
impl<T> AsRef<[T; 8]> for ColumnMatrix2x4<T>
impl<T> AsRef<[T; 8]> for ColumnMatrix4x2<T>
impl<T> AsRef<[T; 8]> for RowMatrix2x4<T>
impl<T> AsRef<[T; 8]> for RowMatrix4x2<T>
impl<T> AsRef<[T; 9]> for ColumnMatrix3<T>
impl<T> AsRef<[T; 9]> for RowMatrix3<T>
impl<T> AsRef<[T; 12]> for ColumnMatrix3x4<T>
impl<T> AsRef<[T; 12]> for ColumnMatrix4x3<T>
impl<T> AsRef<[T; 12]> for RowMatrix3x4<T>
impl<T> AsRef<[T; 12]> for RowMatrix4x3<T>
impl<T> AsRef<[T; 16]> for ColumnMatrix4<T>
impl<T> AsRef<[T; 16]> for RowMatrix4<T>
impl<T> AsRef<[T]> for [T]
impl<T> AsRef<[T]> for devela::_core::slice::Iter<'_, T>
impl<T> AsRef<[T]> for IterMut<'_, T>
impl<T> AsRef<[T]> for SerVec<T>
impl<T> AsRef<[T]> for ArchivedVec<T>
impl<T> AsRef<JsValue> for Closure<T>where
T: ?Sized,
impl<T> AsRef<T> for Cow<'_, T>
impl<T> AsRef<T> for BareBox<T>
impl<T> AsRef<T> for ArchivedBox<T>where
T: ArchivePointee + ?Sized,
impl<T> AsRef<T> for Seal<'_, T>where
T: ?Sized,
impl<T> AsRef<T> for Owned<T>where
T: Pointable + ?Sized,
impl<T> AsRef<[[T; 2]; 2]> for ColumnMatrix2<T>
impl<T> AsRef<[[T; 2]; 2]> for RowMatrix2<T>
impl<T> AsRef<[[T; 2]; 3]> for ColumnMatrix2x3<T>
impl<T> AsRef<[[T; 2]; 3]> for RowMatrix3x2<T>
impl<T> AsRef<[[T; 2]; 4]> for ColumnMatrix2x4<T>
impl<T> AsRef<[[T; 2]; 4]> for RowMatrix4x2<T>
impl<T> AsRef<[[T; 3]; 2]> for ColumnMatrix3x2<T>
impl<T> AsRef<[[T; 3]; 2]> for RowMatrix2x3<T>
impl<T> AsRef<[[T; 3]; 3]> for ColumnMatrix3<T>
impl<T> AsRef<[[T; 3]; 3]> for RowMatrix3<T>
impl<T> AsRef<[[T; 3]; 4]> for ColumnMatrix3x4<T>
impl<T> AsRef<[[T; 3]; 4]> for RowMatrix4x3<T>
impl<T> AsRef<[[T; 4]; 2]> for ColumnMatrix4x2<T>
impl<T> AsRef<[[T; 4]; 2]> for RowMatrix2x4<T>
impl<T> AsRef<[[T; 4]; 3]> for ColumnMatrix4x3<T>
impl<T> AsRef<[[T; 4]; 3]> for RowMatrix3x4<T>
impl<T> AsRef<[[T; 4]; 4]> for ColumnMatrix4<T>
impl<T> AsRef<[[T; 4]; 4]> for RowMatrix4<T>
impl<T, A> AsRef<[T]> for devela::all::Vec<T, A>where
A: Allocator,
impl<T, A> AsRef<[T]> for IntoIter<T, A>where
A: Allocator,
impl<T, A> AsRef<Vec<T, A>> for devela::all::Vec<T, A>where
A: Allocator,
impl<T, A> AsRef<T> for devela::all::Box<T, A>
impl<T, A> AsRef<T> for Rc<T, A>
impl<T, A> AsRef<T> for Arc<T, A>
impl<T, A> AsRef<T> for UniqueRc<T, A>
impl<T, F> AsRef<T> for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
impl<T, U> AsRef<U> for &T
impl<T, U> AsRef<U> for &mut T
impl<T, U> AsRef<U> for PyRef<'_, T>
impl<T, U> AsRef<U> for PyRefMut<'_, T>
impl<T, const CAP: usize> AsRef<[T]> for ArrayVec<T, CAP>
impl<T, const CAP: usize, S: Storage> AsRef<[T; CAP]> for devela::all::Array<T, CAP, S>
impl<T, const N: usize> AsRef<[T; N]> for Simd<T, N>
impl<T, const N: usize> AsRef<[T]> for [T; N]
impl<T, const N: usize> AsRef<[T]> for Simd<T, N>
impl<T, const N: usize> AsRef<[T]> for InlineVec<T, N>
impl<const A: usize> AsRef<[u8]> for AlignedVec<A>
impl<const CAP: usize> AsRef<str> for StringNonul<CAP>
_string_nonul
only.impl<const CAP: usize> AsRef<str> for StringU8<CAP>
impl<const CAP: usize> AsRef<str> for StringU16<CAP>
impl<const CAP: usize> AsRef<str> for StringU32<CAP>
impl<const CAP: usize> AsRef<str> for StringUsize<CAP>
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
impl<const CAP: usize> AsRef<Path> for ArrayString<CAP>
impl<const CAP: usize> AsRef<OsStr> for StringU8<CAP>
impl<const CAP: usize> AsRef<OsStr> for StringU16<CAP>
impl<const CAP: usize> AsRef<OsStr> for StringU32<CAP>
impl<const CAP: usize> AsRef<OsStr> for StringUsize<CAP>
impl<const CAP: usize> AsRef<[u8]> for StringNonul<CAP>
_string_nonul
only.