pub enum Target<Value> {
    Os(Value),
    Family(Value),
    Arch(Value),
}Expand description
A cfg condition for targeting an OS, OS family, or architecture. For example:
let function = FunctionDef {
  attr: SingularSeq(Cfg(Target::Os("linux"))),
  mods: NoOpSeq,
  decl: Function {
    name: Str("conditional_func"),
    args: NoOpSeq
  },
  return_type: Str("()"),
  body: BodyDeclare
};Will render as
ⓘ
#[cfg(target_os = "linux")]
fn conditional_func() -> ();Variants§
Trait Implementations§
Auto Trait Implementations§
impl<Value> Freeze for Target<Value>where
    Value: Freeze,
impl<Value> RefUnwindSafe for Target<Value>where
    Value: RefUnwindSafe,
impl<Value> Send for Target<Value>where
    Value: Send,
impl<Value> Sync for Target<Value>where
    Value: Sync,
impl<Value> Unpin for Target<Value>where
    Value: Unpin,
impl<Value> UnwindSafe for Target<Value>where
    Value: UnwindSafe,
Blanket Implementations§
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