Struct taro_init::project::Project

source ·
pub struct Project {
Show 14 fields pub project_root: String, pub project_name: String, pub npm: NpmType, pub description: Option<String>, pub typescript: Option<bool>, pub template: String, pub css: CSSType, pub auto_install: Option<bool>, pub framework: FrameworkType, pub template_root: String, pub version: String, pub date: Option<String>, pub compiler: Option<CompilerType>, pub period: PeriodType,
}

Fields§

§project_root: String§project_name: String§npm: NpmType§description: Option<String>§typescript: Option<bool>§template: String§css: CSSType§auto_install: Option<bool>§framework: FrameworkType§template_root: String§version: String§date: Option<String>§compiler: Option<CompilerType>§period: PeriodType

Implementations§

source§

impl Project

source

pub fn new( project_root: String, project_name: String, npm: NpmType, description: Option<String>, typescript: Option<bool>, template: String, css: CSSType, framework: FrameworkType, auto_install: Option<bool>, template_root: String, version: String, date: Option<String>, compiler: Option<CompilerType>, period: PeriodType ) -> Self

source

pub async fn create( &self, js_handlers: HashMap<String, ThreadsafeFunction<CreateOptions>> ) -> Result<()>

Trait Implementations§

source§

impl Debug for Project

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromNapiValue for Project

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

Safety Read more
source§

fn from_unknown(value: JsUnknown) -> Result<Self, Error>

source§

impl ToNapiValue for Project

source§

unsafe fn to_napi_value(env: napi_env, val: Project) -> Result<napi_value>

Safety Read more
source§

impl TypeName for Project

source§

impl ValidateNapiValue for Project

source§

unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__ ) -> Result<*mut napi_value__, Error>

Safety Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> JsValuesTupleIntoVec for T
where T: ToNapiValue,

source§

fn into_vec(self, env: *mut napi_env__) -> Result<Vec<*mut napi_value__>, Error>

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.