pub struct Shader {
pub name: String,
pub repository: String,
pub branch: Option<String>,
pub essential: bool,
}
Expand description
A shader repository
Fields§
§name: String
The name of the shader
repository: String
The URL to the shader repository
branch: Option<String>
The branch to use
essential: bool
Is this shader an essential shader?
Implementations§
Source§impl Shader
impl Shader
Sourcepub fn new(
name: &str,
repository: &str,
essential: bool,
branch: Option<&str>,
) -> Self
pub fn new( name: &str, repository: &str, essential: bool, branch: Option<&str>, ) -> Self
Creates a new shader repository
Sourcepub fn pull(&self, directory: &Path) -> ReShaderResult<()>
pub fn pull(&self, directory: &Path) -> ReShaderResult<()>
Pulls the latest changes from the shader repository
Sourcepub fn clone_repo(&self, target_directory: &Path) -> ReShaderResult<Repository>
pub fn clone_repo(&self, target_directory: &Path) -> ReShaderResult<Repository>
Clones the shader repository
Auto Trait Implementations§
impl Freeze for Shader
impl RefUnwindSafe for Shader
impl Send for Shader
impl Sync for Shader
impl Unpin for Shader
impl UnwindSafe for Shader
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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