Struct librashader::presets::WildcardContext
source · pub struct WildcardContext(/* private fields */);
Available on crate feature
presets
only.Expand description
A preset wildcard context.
Any items added after will have higher priority when passed to the shader preset parser.
When passed to the preset parser, the preset parser will automatically add inferred items at lowest priority.
Any items added by the user will override the automatically inferred items.
Implementations§
source§impl WildcardContext
impl WildcardContext
sourcepub fn new() -> WildcardContext
pub fn new() -> WildcardContext
Create a new wildcard context.
sourcepub fn prepend_item(&mut self, item: ContextItem)
pub fn prepend_item(&mut self, item: ContextItem)
Prepend an item to the context builder.
sourcepub fn append_item(&mut self, item: ContextItem)
pub fn append_item(&mut self, item: ContextItem)
Append an item to the context builder. The new item will take precedence over all items added before it.
sourcepub fn add_video_driver_defaults(&mut self, video_driver: VideoDriver)
pub fn add_video_driver_defaults(&mut self, video_driver: VideoDriver)
Prepend sensible defaults for the given video driver.
Any values added, either previously or afterwards will not be overridden.
sourcepub fn add_path_defaults(&mut self, path: impl AsRef<Path>)
pub fn add_path_defaults(&mut self, path: impl AsRef<Path>)
Prepend default entries from the path of the preset.
Any values added, either previously or afterwards will not be overridden.
pub fn to_hashmap( self ) -> SizedHashMap<String, String, BuildHasherDefault<FxHasher>>
Trait Implementations§
source§impl Clone for WildcardContext
impl Clone for WildcardContext
source§fn clone(&self) -> WildcardContext
fn clone(&self) -> WildcardContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for WildcardContext
impl Send for WildcardContext
impl Sync for WildcardContext
impl Unpin for WildcardContext
impl UnwindSafe for WildcardContext
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