diffuser_error/errors/missing_part/
mod.rs1use super::*;
2
3
4
5impl From<MissingPartError> for DiffuserError {
6 fn from(value: MissingPartError) -> Self {
7 DiffuserErrorKind::MissingPart(value).into()
8 }
9}
10
11impl MissingPartKind {
12 pub fn with_local(self, local: PathBuf) -> MissingPartError {
13 MissingPartError { part: self, local: Some(local), remote: None }
14 }
15 pub fn with_remote(self, remote: Url) -> MissingPartError {
16 MissingPartError { part: self, local: None, remote: Some(remote) }
17 }
18}
19
20impl MissingPartError {
21 pub fn with_local(self, local: PathBuf) -> MissingPartError {
22 Self { part: self.part, local: Some(local), remote: self.remote }
23 }
24 pub fn with_remote(self, remote: Url) -> MissingPartError {
25 Self { part: self.part, local: self.local, remote: Some(remote) }
26 }
27}