Trait ethcore_util::standard::ops::Deref 1.0.0
[−]
[src]
pub trait Deref { type Target: ?Sized; fn deref(&self) -> &Self::Target; }
The Deref
trait is used to specify the functionality of dereferencing
operations, like *v
.
Deref
also enables 'Deref
coercions'.
Examples
A struct with a single field which is accessible via dereferencing the struct.
use std::ops::Deref; struct DerefExample<T> { value: T } impl<T> Deref for DerefExample<T> { type Target = T; fn deref(&self) -> &T { &self.value } } fn main() { let x = DerefExample { value: 'a' }; assert_eq!('a', *x); }
Associated Types
Required Methods
Implementors
impl<'a, T> Deref for PeekMut<'a, T> where T: Ord
impl<'a, B> Deref for Cow<'a, B> where B: ToOwned + ?Sized
impl Deref for String
impl<T> Deref for Vec<T>
impl Deref for DBVector
impl<A> Deref for SmallVec<A> where A: Array
impl Deref for H32
impl Deref for H64
impl Deref for H128
impl Deref for H160
impl Deref for H256
impl Deref for H264
impl Deref for H512
impl Deref for H520
impl Deref for H1024
impl Deref for H2048
impl Deref for Lit
impl Deref for CharClass
impl Deref for ByteClass
impl<T> Deref for ElasticArray2<T>
impl<T> Deref for ElasticArray4<T>
impl<T> Deref for ElasticArray8<T>
impl<T> Deref for ElasticArray16<T>
impl<T> Deref for ElasticArray32<T>
impl<T> Deref for ElasticArray36<T>
impl<T> Deref for ElasticArray64<T>
impl<T> Deref for ElasticArray128<T>
impl<T> Deref for ElasticArray256<T>
impl<T> Deref for ElasticArray512<T>
impl<T> Deref for ElasticArray1024<T>
impl<T> Deref for ElasticArray2048<T>
impl<T> Deref for NonZero<T> where T: Zeroable
impl<T> Deref for Unique<T> where T: ?Sized
impl<T> Deref for Shared<T> where T: ?Sized
impl<'a, T> Deref for &'a T where T: ?Sized
impl<'a, T> Deref for &'a mut T where T: ?Sized
impl<'b, T> Deref for Ref<'b, T> where T: ?Sized
impl<'b, T> Deref for RefMut<'b, T> where T: ?Sized
impl<T> Deref for NoDrop<T>
impl<T> Deref for Box<T> where T: ?Sized
impl<T> Deref for Arc<T> where T: ?Sized
impl<T> Deref for Rc<T> where T: ?Sized
impl<O, T> Deref for OwningRef<O, T> where T: ?Sized
impl Deref for CString
impl Deref for OsString
impl<T> Deref for AssertUnwindSafe<T>
impl Deref for PathBuf
impl<'mutex, T> Deref for MutexGuard<'mutex, T> where T: ?Sized
impl<'rwlock, T> Deref for RwLockReadGuard<'rwlock, T> where T: ?Sized
impl<'rwlock, T> Deref for RwLockWriteGuard<'rwlock, T> where T: ?Sized
impl<'a, T> Deref for MutexGuard<'a, T> where T: 'a + ?Sized
impl<'a, T> Deref for RwLockReadGuard<'a, T> where T: 'a + ?Sized
impl<'a, T> Deref for RwLockWriteGuard<'a, T> where T: 'a + ?Sized
impl Deref for RandomTempPath
impl<T> Deref for GuardedTempResult<T>
impl<A> Deref for ArrayString<A> where A: Array<Item=u8>
impl<A> Deref for ArrayVec<A> where A: Array
impl<'a> Deref for ANSIString<'a>
impl<'a> Deref for BytesRef<'a>