[−][src]Struct crystal_engine::state::FixedVec
A fixed vec of light sources. This is limited to 100 entries because of a limitation in the way Crystal's shaders are implemented. Please open an issue if you need more light sources.
This should mirror most functions that exist on Vec. If you're missing a function, feel free to open an issue or PR!
Implementations
impl<T> FixedVec<T>
[src]
pub fn as_slice(&self) -> &[T]
[src]
Extracts a slice containing the entire fixed vec.
Equivalent to &s[..]
.
pub fn as_mut_slice(&mut self) -> &mut [T]
[src]
Extracts a mutable slice of the entire fixed vec.
Equivalent to &mut s[..]
.
pub fn len(&self) -> usize
[src]
Get the amount of lights that are stored in this FixedVec
.
Note: this is always 100 or lower.
pub fn is_empty(&self) -> bool
[src]
Returns true
if this FixedVec
is empty.
This is an alias for self.len() == 0
pub fn push(&mut self, t: T)
[src]
Add a new light to this FixedVec
.
This will panic if more than 100 lights are added.
pub fn pop(&mut self)
[src]
Remove the last light source from this FixedVec
.
This will panic if the FixedVec
is empty.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for FixedVec<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for FixedVec<T> where
T: Send,
T: Send,
impl<T> Sync for FixedVec<T> where
T: Sync,
T: Sync,
impl<T> Unpin for FixedVec<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for FixedVec<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,