pub struct PerPlatform<T> { /* private fields */ }
Expand description
Data that that can vary per platform
Implementations§
Source§impl<T> PerPlatform<T>
impl<T> PerPlatform<T>
Sourcepub fn current_platform(&self) -> &T
pub fn current_platform(&self) -> &T
Merge per-platform overrides for the configured build target platform, with more specific platform overrides having higher priority.
pub fn get(&self, platform: &PlatformIdentifier) -> &T
Source§impl<U, E> PerPlatform<Result<U, E>>where
E: Error,
impl<U, E> PerPlatform<Result<U, E>>where
E: Error,
pub fn transpose(self) -> Result<PerPlatform<U>, E>
Trait Implementations§
Source§impl<T: Clone> Clone for PerPlatform<T>
impl<T: Clone> Clone for PerPlatform<T>
Source§fn clone(&self) -> PerPlatform<T>
fn clone(&self) -> PerPlatform<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for PerPlatform<T>
impl<T: Debug> Debug for PerPlatform<T>
Source§impl<T: Default> Default for PerPlatform<T>
impl<T: Default> Default for PerPlatform<T>
Source§impl<'de, T> Deserialize<'de> for PerPlatform<T>
impl<'de, T> Deserialize<'de> for PerPlatform<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromLua for PerPlatform<BuildSpec>
impl FromLua for PerPlatform<BuildSpec>
Source§impl FromLua for PerPlatform<BuildSpecInternal>
impl FromLua for PerPlatform<BuildSpecInternal>
Source§impl FromLua for PerPlatform<RemoteRockSource>
impl FromLua for PerPlatform<RemoteRockSource>
Source§impl<T> FromLua for PerPlatform<T>
impl<T> FromLua for PerPlatform<T>
Source§impl FromLua for PerPlatform<TestSpec>
impl FromLua for PerPlatform<TestSpec>
Source§impl<T: PartialEq> PartialEq for PerPlatform<T>
impl<T: PartialEq> PartialEq for PerPlatform<T>
Source§impl<T> UserData for PerPlatform<T>where
T: IntoLuaMulti + Clone,
impl<T> UserData for PerPlatform<T>where
T: IntoLuaMulti + Clone,
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Adds custom methods and operators specific to this userdata.
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Adds custom fields specific to this userdata.
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Registers this type for use in Lua. Read more
impl<T> StructuralPartialEq for PerPlatform<T>
Auto Trait Implementations§
impl<T> Freeze for PerPlatform<T>where
T: Freeze,
impl<T> RefUnwindSafe for PerPlatform<T>where
T: RefUnwindSafe,
impl<T> Send for PerPlatform<T>where
T: Send,
impl<T> Sync for PerPlatform<T>where
T: Sync,
impl<T> Unpin for PerPlatform<T>where
T: Unpin,
impl<T> UnwindSafe for PerPlatform<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
Source§impl<T> FromLuaMulti for Twhere
T: FromLua,
impl<T> FromLuaMulti for Twhere
T: FromLua,
Source§fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
Performs the conversion. Read more
fn from_lua_args( args: MultiValue, i: usize, to: Option<&str>, lua: &Lua, ) -> Result<T, Error>
unsafe fn from_stack_multi(nvals: i32, lua: &RawLua) -> Result<T, Error>
unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &RawLua, ) -> Result<T, Error>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
Source§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.