Struct servo_arc::NonZeroPtrMut [] [src]

pub struct NonZeroPtrMut<T: ?Sized + 'static>(_);

Wrapper type for pointers to get the non-zero optimization. When NonZero/Shared/Unique are stabilized, we should just use Shared here to get the same effect. Gankro is working on this in 1.

It's unfortunate that this needs to infect all the caller types with 'static. It would be nice to just use a &() and a PhantomData instead, but then the compiler can't determine whether the &() should be thin or fat (which depends on whether or not T is sized). Given that this is all a temporary hack, this restriction is fine for now.

Methods

impl<T: ?Sized> NonZeroPtrMut<T>
[src]

[src]

[src]

Trait Implementations

impl<T: ?Sized + 'static> Clone for NonZeroPtrMut<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: ?Sized + 'static> Pointer for NonZeroPtrMut<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: ?Sized + 'static> Debug for NonZeroPtrMut<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: ?Sized + 'static> PartialEq for NonZeroPtrMut<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T: ?Sized + 'static> Eq for NonZeroPtrMut<T>
[src]

impl<T: Sized + 'static> Hash for NonZeroPtrMut<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more