pub struct ObjPatProp {
pub key: String,
pub computed_key: Option<Expression>,
pub value: Pattern,
pub default: Option<Expression>,
pub is_rest: bool,
}Expand description
オブジェクトパターンの 1 プロパティ。
Fields§
§key: String取り出すソースキー(is_rest の場合は未使用。computed_key が Some の場合も
未使用で、実際のキーは束縛時に computed_key を評価して得る)。
computed_key: Option<Expression>算出プロパティ名 {[expr]: target}。Some の場合、key フィールドは無視される。
value: Pattern束縛先パターン({a} なら Identifier(“a”)、{a: {b}} ならネスト)。
default: Option<Expression>§is_rest: boolTrait Implementations§
Source§impl Clone for ObjPatProp
impl Clone for ObjPatProp
Source§fn clone(&self) -> ObjPatProp
fn clone(&self) -> ObjPatProp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjPatProp
impl Debug for ObjPatProp
Source§impl PartialEq for ObjPatProp
impl PartialEq for ObjPatProp
Source§fn eq(&self, other: &ObjPatProp) -> bool
fn eq(&self, other: &ObjPatProp) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ObjPatProp
Auto Trait Implementations§
impl Freeze for ObjPatProp
impl RefUnwindSafe for ObjPatProp
impl Send for ObjPatProp
impl Sync for ObjPatProp
impl Unpin for ObjPatProp
impl UnsafeUnpin for ObjPatProp
impl UnwindSafe for ObjPatProp
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