Skip to main content

SlangShaders

Struct SlangShaders 

Source
pub struct SlangShaders<'a> {
    pub dir: &'a Path,
    pub fragments: &'a [(&'a str, &'a str)],
    pub specs: &'a [SlangLibSpec],
}
Expand description

The single-source half of the precompile: where the .slang files live, the shared declarations spliced into the ones carrying a marker, and one spec per metallib variant. Grouped because they always travel together, and because the splice table has to match the renderer’s slang_source::assemble exactly – the two produce the same text or the content-addressed cache serves one path’s bytes to the other.

Fields§

§dir: &'a Path

Directory holding the .slang sources.

§fragments: &'a [(&'a str, &'a str)]

Shared declarations spliced into sources carrying a marker.

§specs: &'a [SlangLibSpec]

One spec per metallib variant.

Auto Trait Implementations§

§

impl<'a> Freeze for SlangShaders<'a>

§

impl<'a> RefUnwindSafe for SlangShaders<'a>

§

impl<'a> Send for SlangShaders<'a>

§

impl<'a> Sync for SlangShaders<'a>

§

impl<'a> Unpin for SlangShaders<'a>

§

impl<'a> UnsafeUnpin for SlangShaders<'a>

§

impl<'a> UnwindSafe for SlangShaders<'a>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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.