over_there/core/client/
file.rs1use crate::core::reply::FileOpenedArgs;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct RemoteFile {
5 pub(crate) id: u32,
6 pub(crate) sig: u32,
7 pub(crate) path: String,
8}
9
10impl RemoteFile {
11 pub fn id(&self) -> u32 {
12 self.id
13 }
14
15 pub fn path(&self) -> &str {
16 &self.path
17 }
18}
19
20impl From<FileOpenedArgs> for RemoteFile {
21 fn from(args: FileOpenedArgs) -> Self {
22 Self {
23 id: args.id,
24 sig: args.sig,
25 path: args.path,
26 }
27 }
28}