Struct VecProp

Source
pub struct VecProp<T>
where T: Send + Sync + Clone,
{ /* private fields */ }
Expand description

A vec prop is a special property that uses a list

Implementations§

Source§

impl<T> VecProp<T>
where T: 'static + Send + Sync + Clone,

Source

pub fn new(id: Id) -> VecProp<T>

create a new vec prop with a given id

Source

pub fn from<I, P>(&mut self, values: P)
where I: IntoIterator<Item = T> + Clone + Send + Sync + 'static, P: IntoProvider<I>, <P as IntoProvider<I>>::Provider: 'static,

Resets this property to contain only the values from the provider

Source

pub fn push_with<P>(&mut self, value: P)
where P: IntoProvider<T>, <P as IntoProvider<T>>::Provider: 'static,

Push a value to the vector

Source

pub fn push_all_with<P, I>(&mut self, value: P)
where I: IntoIterator<Item = T> + Clone + Send + Sync + 'static, P: IntoProvider<I>, <P as IntoProvider<I>>::Provider: 'static,

Push all value to the vector

Source

pub fn push<V>(&mut self, value: V)
where V: Into<T>,

Push a value to the vector

Source

pub fn push_all<V, I>(&mut self, value: I)
where I: IntoIterator<Item = V>, V: Into<T>,

Push a value to the vector

Source

pub fn clear(&mut self)

Clears the contents of the vector

Trait Implementations§

Source§

impl<T> Buildable for VecProp<T>
where T: 'static + Send + Sync + Clone,

Source§

fn get_dependencies( &self, project: &Project, ) -> Result<HashSet<TaskId>, PayloadError<ProjectError>>

Gets the dependencies required to build this task
Source§

impl<T> Clone for VecProp<T>
where T: Clone + Send + Sync,

Source§

fn clone(&self) -> VecProp<T>

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

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

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for VecProp<T>
where T: 'static + Send + Sync + Clone,

Source§

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

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

impl<T> Default for VecProp<T>
where T: 'static + Send + Sync + Clone,

Source§

fn default() -> VecProp<T>

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

impl<P, T> Extend<P> for VecProp<T>
where T: 'static + Send + Sync + Clone, P: IntoProvider<T>, <P as IntoProvider<T>>::Provider: 'static,

Source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = P>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<T> IntoIterator for VecProp<T>
where T: 'static + Send + Sync + Clone,

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = <Vec<T> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <VecProp<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> Provider<Vec<T>> for VecProp<T>
where T: 'static + Send + Sync + Clone,

Source§

fn try_get(&self) -> Option<Vec<T>>

A vec prop will never return an empty vec

Source§

fn missing_message(&self) -> String

The missing message for this provider
Source§

fn fallible_get(&self) -> Result<Vec<T>, ProviderError>

Tries to get a value from this provider, returning an error if not available. Read more
Source§

fn get(&self) -> T

Get a value from the provider. Read more
Source§

impl<T> Serialize for VecProp<T>
where T: Serialize + 'static + Send + Sync + Clone,

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<T> Freeze for VecProp<T>

§

impl<T> RefUnwindSafe for VecProp<T>

§

impl<T> Send for VecProp<T>

§

impl<T> Sync for VecProp<T>

§

impl<T> Unpin for VecProp<T>

§

impl<T> UnwindSafe for VecProp<T>

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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<B> GetBuildable for B
where B: IntoBuildable + Clone, <B as IntoBuildable>::Buildable: 'static,

Source§

fn as_buildable(&self) -> BuildableObject

Returns a dependency which contains the tasks which build this object.
Source§

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

Source§

fn instance_of<T>(&self) -> bool
where T: Any + ?Sized,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<B> IntoBuildable for B
where B: Buildable,

Source§

type Buildable = B

Source§

fn into_buildable(self) -> B

Returns a dependency which contains the tasks which build this object.
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> IntoNamed for T

Source§

fn named<S>(self, name: S) -> Named<Self>
where S: AsRef<str>,

Add a name to this object
Source§

impl<P, T> IntoProvider<T> for P
where T: Clone + Send + Sync, P: Provider<T> + Send + Sync,

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<P, T> ProviderExt<T> for P
where T: Clone + Send + Sync, P: Provider<T> + Send + Sync + 'static,

Source§

fn map<R, F>(self, transform: F) -> Map<T, R, F, Self>
where R: Send + Sync + Clone, F: Fn(T) -> R + Send + Sync, Self: 'static,

Creates a provider that can map the output of one provider into some other value. Read more
Source§

fn flat_map<R, P, F>(self, transform: F) -> FlatMap<T, R, Self, P, F>
where R: Send + Sync + Clone, P: Provider<R>, F: Fn(T) -> P + Send + Sync,

Creates a provider that can map the output of one provider with type T into some other value that’s also a provider of type R. The created provider is a provider of type R Read more
Source§

fn flatten<B>(self) -> FlatMap<T, B, Self, T, fn(T) -> T>
where Self: Clone + 'static, T: Provider<B>, B: Clone + Send + Sync,

Flattens a provider that provides another provider
Source§

fn zip<P, B, R, F>(self, other: P, func: F) -> Zip<T, B, R, F>
where Self: 'static, P: IntoProvider<B>, <P as IntoProvider<B>>::Provider: 'static, B: Send + Sync + Clone, R: Send + Sync + Clone, F: Fn(T, B) -> R + Send + Sync,

Creates a provider that can map the output of two provider with type T1 and T2 into some other value and transforms the two values into one output value of type B. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be 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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<E> Extension for E
where E: 'static + Send + Sync,