Trait gdnative::nativescript::Map[][src]

pub trait Map: UserData {
    type Err: Debug;
    pub fn map<F, U>(&self, op: F) -> Result<U, Self::Err>
    where
        F: FnOnce(&Self::Target) -> U
; }

Trait for wrappers that can be mapped immutably.

Associated Types

Loading content...

Required methods

pub fn map<F, U>(&self, op: F) -> Result<U, Self::Err> where
    F: FnOnce(&Self::Target) -> U, 
[src]

Maps a &T to U. Called for methods that take &self.

Implementations of this method must not panic. Failures should be indicated by returning Err.

Loading content...

Implementors

impl<T> Map for Aether<T> where
    T: NativeClass + Copy + Default
[src]

type Err = Infallible

impl<T> Map for ArcData<T> where
    T: NativeClass + Send + Sync
[src]

type Err = Infallible

impl<T> Map for LocalCellData<T> where
    T: NativeClass
[src]

type Err = LocalCellError

impl<T, OPT> Map for MutexData<T, OPT> where
    T: NativeClass + Send,
    OPT: LockOptions
[src]

type Err = LockFailed

impl<T, OPT> Map for RwLockData<T, OPT> where
    T: NativeClass + Send + Sync,
    OPT: LockOptions
[src]

type Err = LockFailed

Loading content...