google_maps2/client/build.rs
1use crate::client::GoogleMapsClient;
2
3// =============================================================================
4
5impl GoogleMapsClient {
6 // -------------------------------------------------------------------------
7 //
8 /// Completes the builder pattern into a final structure.
9 ///
10 /// ## Arguments
11 ///
12 /// This method accepts no arguments.
13
14 #[cfg(feature = "enable-reqwest")]
15 #[must_use]
16 pub fn build(&self) -> Self {
17 self.clone()
18 } // fn
19
20 // -------------------------------------------------------------------------
21 //
22 /// Completes the builder pattern into a final structure.
23 ///
24 /// ## Arguments
25 ///
26 /// This method accepts no arguments.
27
28 #[cfg(not(feature = "enable-reqwest"))]
29 #[must_use]
30 pub fn build(&self) -> Self {
31 Self {
32 key: self.key.clone(),
33 } // GoogleMapsClient
34 } // fn
35
36 // -------------------------------------------------------------------------
37 //
38 /// Completes the builder pattern into a final structure.
39 ///
40 /// `GoogleMapsClient::build()` is preferred. `finalize` has been kept for
41 /// backward compatibility.
42 ///
43 /// ## Arguments
44 ///
45 /// This method accepts no arguments.
46
47 #[cfg(feature = "enable-reqwest")]
48 #[deprecated(since = "3.4.3", note = "use `build` instead")]
49 #[must_use]
50 pub fn finalize(&self) -> Self {
51 self.build()
52 } // fn
53
54 // -------------------------------------------------------------------------
55 //
56 /// Completes the builder pattern into a final structure.
57 ///
58 /// `GoogleMapsClient::build()` is preferred. `finalize` has been kept for
59 /// backward compatibility.
60 ///
61 /// ## Arguments
62 ///
63 /// This method accepts no arguments.
64
65 #[cfg(not(feature = "enable-reqwest"))]
66 #[deprecated(since = "3.4.3", note = "use `build` instead")]
67 #[must_use]
68 pub fn finalize(&self) -> Self {
69 self.build()
70 } // fn
71} // impl