[][src]Struct broccoli::pmut::PMut

#[repr(transparent)]pub struct PMut<'a, T: ?Sized> { /* fields omitted */ }

A protected mutable reference that derefs to &T. See the pmut module documentation for more explanation.

Implementations

impl<'a, 'b: 'a, T> PMut<'a, PMut<'b, T>>[src]

pub fn flatten(self) -> PMut<'a, T>[src]

Flatten a double pointer

impl<'a, T> PMut<'a, T>[src]

pub fn into_slice(self) -> PMut<'a, [T]>[src]

Convert a PMut<T> inside a PMut<[T]> of size one.

impl<'a, T: ?Sized> PMut<'a, T>[src]

pub fn new(inner: &'a mut T) -> PMut<'a, T>[src]

Create a protected pointer.

pub fn borrow_mut(&mut self) -> PMut<'_, T>[src]

Start a new borrow lifetime

pub fn into_ref(self) -> &'a T[src]

impl<'a, 'b: 'a, T: Aabb> PMut<'a, Node<'b, T>>[src]

pub fn into_node_ref(self) -> NodeRef<'a, T>[src]

Destructure a node into its three parts.

pub fn into_range(self) -> PMut<'a, [T]>[src]

Return a mutable list of elements in this node.

impl<'a, T: Aabb> PMut<'a, T>[src]

pub fn unpack_rect(self) -> &'a Rect<T::Num>[src]

impl<'a, T: HasInner> PMut<'a, T>[src]

pub fn unpack(self) -> (&'a Rect<T::Num>, &'a mut T::Inner)[src]

Unpack for the read-only rect and the mutable inner component

pub fn unpack_inner(self) -> &'a mut T::Inner[src]

Unpack only the mutable innner component

impl<'a, T> PMut<'a, [T]>[src]

pub fn get_index_mut(self, ind: usize) -> PMut<'a, T>[src]

Return the element at the specified index. We can't use the index trait because we don't want to return a mutable reference.

pub fn split_first_mut(self) -> Option<(PMut<'a, T>, PMut<'a, [T]>)>[src]

Split off the first element.

pub fn truncate_to(self, a: RangeTo<usize>) -> Self[src]

Return a smaller slice that ends with the specified index.

pub fn truncate_from(self, a: RangeFrom<usize>) -> Self[src]

Return a smaller slice that starts at the specified index.

pub fn truncate(self, a: Range<usize>) -> Self[src]

Return a smaller slice that starts and ends with the specified range.

pub fn iter_mut(self) -> PMutIter<'a, T>

Notable traits for PMutIter<'a, T>

impl<'a, T> Iterator for PMutIter<'a, T> type Item = PMut<'a, T>;
[src]

Return a mutable iterator.

Trait Implementations

impl<'a, T: Aabb> Aabb for PMut<'a, T>[src]

type Num = T::Num

impl<'a, T: Debug + ?Sized> Debug for PMut<'a, T>[src]

impl<'a, T: ?Sized> Deref for PMut<'a, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'a, T> IntoIterator for PMut<'a, [T]>[src]

type Item = PMut<'a, T>

The type of the elements being iterated over.

type IntoIter = PMutIter<'a, T>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a, T: ?Sized> RefUnwindSafe for PMut<'a, T> where
    T: RefUnwindSafe
[src]

impl<'a, T: ?Sized> Send for PMut<'a, T> where
    T: Send
[src]

impl<'a, T: ?Sized> Sync for PMut<'a, T> where
    T: Sync
[src]

impl<'a, T: ?Sized> Unpin for PMut<'a, T>[src]

impl<'a, T> !UnwindSafe for PMut<'a, T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.