pub struct UrlParts { /* private fields */ }Expand description
Typed URL parts split at build-time.
Implementations§
Source§impl UrlParts
impl UrlParts
Sourcepub const fn scheme(&self) -> &'static str
pub const fn scheme(&self) -> &'static str
Examples found in repository?
examples/v04_typed.rs (line 20)
4fn main() {
5 println!("=== r-resources v0.4.0 (typed resources) ===\n");
6
7 // Color typed from resources (build-generated)
8 let c = color_t::ACCENT;
9 println!(
10 "Color rgba=({}, {}, {}, {}) rgba_u32=0x{:08X}",
11 c.r(),
12 c.g(),
13 c.b(),
14 c.a(),
15 c.to_rgba_u32()
16 );
17
18 // URL typed from resources (build-generated)
19 let api = url_t::API_BASE;
20 println!("Url: {}://{}{}", api.scheme(), api.host(), api.path());
21}Sourcepub const fn host(&self) -> &'static str
pub const fn host(&self) -> &'static str
Examples found in repository?
examples/v04_typed.rs (line 20)
4fn main() {
5 println!("=== r-resources v0.4.0 (typed resources) ===\n");
6
7 // Color typed from resources (build-generated)
8 let c = color_t::ACCENT;
9 println!(
10 "Color rgba=({}, {}, {}, {}) rgba_u32=0x{:08X}",
11 c.r(),
12 c.g(),
13 c.b(),
14 c.a(),
15 c.to_rgba_u32()
16 );
17
18 // URL typed from resources (build-generated)
19 let api = url_t::API_BASE;
20 println!("Url: {}://{}{}", api.scheme(), api.host(), api.path());
21}Sourcepub const fn path(&self) -> &'static str
pub const fn path(&self) -> &'static str
Examples found in repository?
examples/v04_typed.rs (line 20)
4fn main() {
5 println!("=== r-resources v0.4.0 (typed resources) ===\n");
6
7 // Color typed from resources (build-generated)
8 let c = color_t::ACCENT;
9 println!(
10 "Color rgba=({}, {}, {}, {}) rgba_u32=0x{:08X}",
11 c.r(),
12 c.g(),
13 c.b(),
14 c.a(),
15 c.to_rgba_u32()
16 );
17
18 // URL typed from resources (build-generated)
19 let api = url_t::API_BASE;
20 println!("Url: {}://{}{}", api.scheme(), api.host(), api.path());
21}Trait Implementations§
impl Copy for UrlParts
impl Eq for UrlParts
impl StructuralPartialEq for UrlParts
Auto Trait Implementations§
impl Freeze for UrlParts
impl RefUnwindSafe for UrlParts
impl Send for UrlParts
impl Sync for UrlParts
impl Unpin for UrlParts
impl UnwindSafe for UrlParts
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