Struct Task

Source
pub struct Task {
    pub kind: String,
    pub action_name: String,
    pub input_arguments: Vec<Input>,
    pub attributes: HashMap<String, String>,
    pub operation: Operation,
    pub depend_on: Vec<Depend>,
}

Fields§

§kind: String§action_name: String§input_arguments: Vec<Input>§attributes: HashMap<String, String>§operation: Operation§depend_on: Vec<Depend>

Implementations§

Source§

impl Task

Source

pub fn from_value<'v>(x: Value<'v>) -> Option<&'v Self>

Downcast a value to self type.

Trait Implementations§

Source§

impl AllocFrozenValue for Task

Source§

fn alloc_frozen_value(self, heap: &FrozenHeap) -> FrozenValue

Allocate a value in the frozen heap and return a reference to the allocated value.
Source§

impl<'v> AllocValue<'v> for Task

Source§

fn alloc_value(self, heap: &'v Heap) -> Value<'v>

Allocate the value on a heap and return a reference to the allocated value. Read more
Source§

impl Allocative for Task

Source§

fn visit<'allocative_a, 'allocative_b: 'allocative_a>( &self, visitor: &'allocative_a mut Visitor<'allocative_b>, )

Source§

impl Clone for Task

Source§

fn clone(&self) -> Task

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Task

Source§

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

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

impl Default for Task

Source§

fn default() -> Task

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Task

Source§

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 Display for Task

Source§

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

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

impl PartialEq for Task

Source§

fn eq(&self, other: &Task) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'pst> ProvidesStaticType<'pst> for Task

Source§

type StaticType = Task

Same type as Self but with lifetimes dropped to 'static. Read more
Source§

impl Serialize for Task

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'v> StarlarkTypeRepr for &'v Task

Source§

fn starlark_type_repr() -> Ty

The representation of a type that a user would use verbatim in starlark type annotations
Source§

impl<'v> StarlarkValue<'v> for Task

Source§

const TYPE: &'static str = "Task"

Return a string describing the type of self, as returned by the type() function. Read more
Source§

type Canonical = Task

Two implementations of StarlarkValue are considered to have the same type, if Canonical field points to the same type. Read more
Source§

fn get_type_value_static() -> FrozenStringValue

Like TYPE, but returns a reusable FrozenStringValue pointer to it. This function deliberately doesn’t take a heap, as it would not be performant to allocate a new value each time. Read more
Source§

fn attr_ty(_attr: &str) -> Option<Ty>

Attribute type, for the typechecker. Read more
Source§

fn get_type_starlark_repr() -> Ty

Return a string that is the representation of a type that a user would use in type annotations. This often will be the same as Self::TYPE, but in some instances it might be slightly different than what is returned by TYPE. Read more
Source§

fn matches_type(&self, ty: &str) -> bool

Is this value a match for a named type. Usually returns true for values matching get_type, but might also work for subtypes it implements.
Source§

fn get_methods() -> Option<&'static Methods>
where Self: Sized,

Get the members associated with this type, accessible via this_type.x. These members will have dir/getattr/hasattr properly implemented, so it is the preferred way to go if possible. See MethodsStatic for an example of how to define this method.
Source§

fn documentation(&self) -> Option<DocItem>
where Self: Sized,

Return structured documentation for self, if available.
Source§

fn typechecker_ty(&self) -> Option<Ty>

Type of this instance for typechecker. Note this can be more precise than generic type.
Source§

fn collect_repr(&self, collector: &mut String)

Return a string representation of self, as returned by the repr() function. Defaults to the Display instance - which should be fine for nearly all types. In many cases the repr() representation will also be a Starlark expression for creating the value. Read more
Source§

fn collect_repr_cycle(&self, collector: &mut String)

Invoked to print repr when a cycle is the object stack is detected.
Source§

fn name_for_call_stack(&self, me: Value<'v>) -> String

String used when printing call stack. repr(self) by default.
Source§

fn to_bool(&self) -> bool

Convert self to a boolean, as returned by the bool() function. The default implementation returns true.
Source§

fn write_hash(&self, hasher: &mut StarlarkHasher) -> Result<(), Error>

Return a hash data for self to be used when self is placed as a key in a Dict. Return an Err if there is no hash for this value (e.g. list). Must be stable between frozen and non-frozen values.
Source§

fn equals(&self, _other: Value<'v>) -> Result<bool, Error>

Compare self with other for equality. Should only return an error on excessive recursion. Read more
Source§

fn compare(&self, other: Value<'v>) -> Result<Ordering, Error>

Compare self with other. This method returns a result of type Ordering, or an Err if the two types differ.
Source§

fn invoke( &self, _me: Value<'v>, _args: &Arguments<'v, '_>, _eval: &mut Evaluator<'v, '_>, ) -> Result<Value<'v>, Error>

Directly invoke a function. The number of named and names arguments are guaranteed to be equal. Read more
Source§

fn at(&self, index: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Return the result of a[index] if a is indexable.
Source§

fn at2( &self, _index0: Value<'v>, _index1: Value<'v>, _heap: &'v Heap, _private: Private, ) -> Result<Value<'v>, Error>

Return the result of a[index0, index1] if a is indexable by two parameters.
Source§

fn slice( &self, _start: Option<Value<'v>>, _stop: Option<Value<'v>>, _stride: Option<Value<'v>>, _heap: &'v Heap, ) -> Result<Value<'v>, Error>

Extract a slice of the underlying object if the object is indexable. The result will be object between start and stop (both of them are added length() if negative and then clamped between 0 and length()). stride indicates the direction. Read more
Source§

fn iterate_collect(&self, _heap: &'v Heap) -> Result<Vec<Value<'v>>, Error>

Implement iteration over the value of this container by providing the values in a Vec.
Source§

unsafe fn iterate( &self, _me: Value<'v>, heap: &'v Heap, ) -> Result<Value<'v>, Error>

Returns an iterator over the value of this container if this value holds an iterable container. Read more
Source§

unsafe fn iter_size_hint(&self, _index: usize) -> (usize, Option<usize>)

Returns the size hint for the iterator.
Source§

unsafe fn iter_next(&self, _index: usize, _heap: &'v Heap) -> Option<Value<'v>>

Yield the next value from the iterator. Read more
Source§

unsafe fn iter_stop(&self)

Indicate that the iteration is finished. Read more
Source§

fn length(&self) -> Result<i32, Error>

Returns the length of the value, if this value is a sequence.
Source§

fn get_attr(&self, _attribute: &str, _heap: &'v Heap) -> Option<Value<'v>>

Get an attribute for the current value as would be returned by dotted expression (i.e. a.attribute). Read more
Source§

fn get_attr_hashed( &self, attribute: Hashed<&str>, heap: &'v Heap, ) -> Option<Value<'v>>

A version of get_attr which takes BorrowHashed<str> instead of &str, thus implementation may reuse the hash of the string if this is called repeatedly with the same string. Read more
Source§

fn has_attr(&self, attribute: &str, heap: &'v Heap) -> bool

Return true if an attribute of name attribute exists for the current value. Read more
Source§

fn dir_attr(&self) -> Vec<String>

Return a vector of string listing all attribute of the current value. Read more
Source§

fn is_in(&self, other: Value<'v>) -> Result<bool, Error>

Tell whether other is in the current value, if it is a container. Read more
Source§

fn plus(&self, _heap: &'v Heap) -> Result<Value<'v>, Error>

Apply the + unary operator to the current value. Read more
Source§

fn minus(&self, _heap: &'v Heap) -> Result<Value<'v>, Error>

Apply the - unary operator to the current value. Read more
Source§

fn radd( &self, _lhs: Value<'v>, _heap: &'v Heap, ) -> Option<Result<Value<'v>, Error>>

Add with the arguments the other way around. Should return None to fall through to normal add.
Source§

fn add( &self, _rhs: Value<'v>, _heap: &'v Heap, ) -> Option<Result<Value<'v>, Error>>

Add other to the current value. Pass both self and the Value form of self as original. Read more
Source§

fn sub(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Subtract other from the current value. Read more
Source§

fn rmul( &self, lhs: Value<'v>, heap: &'v Heap, ) -> Option<Result<Value<'v>, Error>>

Called on rhs of lhs * rhs when lhs.mul returns None.
Source§

fn mul( &self, _rhs: Value<'v>, _heap: &'v Heap, ) -> Option<Result<Value<'v>, Error>>

Multiply the current value with other. Read more
Source§

fn div(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Divide the current value by other. Always results in a float value. Read more
Source§

fn percent(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Apply the percent operator between the current value and other. Usually used on strings, as per the Starlark spec. Read more
Source§

fn floor_div( &self, other: Value<'v>, _heap: &'v Heap, ) -> Result<Value<'v>, Error>

Floor division between the current value and other. Read more
Source§

fn bit_and(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Bitwise & operator.
Source§

fn bit_or(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Bitwise | operator. Read more
Source§

fn bit_xor(&self, other: Value<'v>, _heap: &'v Heap) -> Result<Value<'v>, Error>

Bitwise ^ operator.
Source§

fn bit_not(&self, _heap: &'v Heap) -> Result<Value<'v>, Error>

Bitwise ~ operator.
Source§

fn left_shift( &self, other: Value<'v>, _heap: &'v Heap, ) -> Result<Value<'v>, Error>

Bitwise << operator.
Source§

fn right_shift( &self, other: Value<'v>, _heap: &'v Heap, ) -> Result<Value<'v>, Error>

Bitwise >> operator.
Source§

fn bin_op_ty(_op: TypingBinOp, _rhs: &TyBasic) -> Option<Ty>

Typecheck this op rhs.
Source§

fn rbin_op_ty(_lhs: &TyBasic, _op: TypingBinOp) -> Option<Ty>

Typecheck lhs op this.
Source§

fn export_as( &self, _variable_name: &str, _eval: &mut Evaluator<'v, '_>, ) -> Result<(), Error>

Called when exporting a value under a specific name,
Source§

fn set_at(&self, _index: Value<'v>, _new_value: Value<'v>) -> Result<(), Error>

Set the value at index with the new value. Read more
Source§

fn set_attr(&self, attribute: &str, _new_value: Value<'v>) -> Result<(), Error>

Set the attribute named attribute of the current value to value (e.g. a.attribute = value).
Source§

fn provide(&'v self, demand: &mut Demand<'_, 'v>)

Dynamically provide values based on type. Read more
Source§

impl<'v> UnpackValue<'v> for &'v Task

Source§

fn expected() -> String

Description of values acceptable by unpack_value, e. g. list or str.
Source§

fn unpack_value(x: Value<'v>) -> Option<&'v Task>

Given a Value, try and unpack it into the given type, which may involve some element of conversion.
Source§

fn unpack_value_err(value: Value<'v>) -> Result<Self, Error>

Unpack a value, but return error instead of None if unpacking fails.
Source§

fn unpack_param(value: Value<'v>) -> Result<Self, Error>

Unpack value, but instead of None return error about incorrect argument type.
Source§

fn unpack_named_param(value: Value<'v>, param_name: &str) -> Result<Self, Error>

Unpack value, but instead of None return error about incorrect named argument type.
Source§

impl Eq for Task

Source§

impl StructuralPartialEq for Task

Auto Trait Implementations§

§

impl Freeze for Task

§

impl RefUnwindSafe for Task

§

impl Send for Task

§

impl Sync for Task

§

impl Unpin for Task

§

impl UnwindSafe for Task

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<'a, T> AnyLifetime<'a> for T
where T: ProvidesStaticType<'a> + 'a + ?Sized,

Source§

fn static_type_id() -> TypeId

Must return the TypeId of Self but where the lifetimes are changed to 'static. Must be consistent with static_type_of.
Source§

fn static_type_of(&self) -> TypeId

Must return the TypeId of Self but where the lifetimes are changed to 'static. Must be consistent with static_type_id. Must not consult the self parameter in any way.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<'v, T> StarlarkTypeRepr for T
where T: StarlarkValue<'v> + ?Sized,

Source§

fn starlark_type_repr() -> Ty

The representation of a type that a user would use verbatim in starlark type annotations
Source§

impl<T> ToAst for T

Source§

fn ast(self, begin: usize, end: usize) -> Spanned<Self>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,