diff --git a/src/windowing/state/builder.rs b/src/windowing/state/builder.rs index b5fe076..0a0ff8c 100644 --- a/src/windowing/state/builder.rs +++ b/src/windowing/state/builder.rs @@ -21,55 +21,66 @@ pub struct WindowStateBuilder { } impl WindowStateBuilder { + #[must_use] pub fn new() -> Self { Self::default() } + #[must_use] pub fn with_surface(mut self, surface: Rc) -> Self { self.surface = Some(surface); self } + #[must_use] pub fn with_layer_surface(mut self, layer_surface: Rc) -> Self { self.layer_surface = Some(layer_surface); self } + #[must_use] pub const fn with_size(mut self, size: PhysicalSize) -> Self { self.size = Some(size); self } + #[must_use] pub const fn with_output_size(mut self, output_size: PhysicalSize) -> Self { self.output_size = Some(output_size); self } + #[must_use] pub fn with_pointer(mut self, pointer: Rc) -> Self { self.pointer = Some(pointer); self } + #[must_use] pub fn with_window(mut self, window: Rc) -> Self { self.window = Some(window); self } + #[must_use] pub const fn with_scale_factor(mut self, scale_factor: f32) -> Self { self.scale_factor = scale_factor; self } + #[must_use] pub const fn with_height(mut self, height: u32) -> Self { self.height = height; self } + #[must_use] pub const fn with_exclusive_zone(mut self, exclusive_zone: i32) -> Self { self.exclusive_zone = exclusive_zone; self } + #[must_use] pub fn with_component_definition(mut self, component_definition: ComponentDefinition) -> Self { self.component_definition = Some(component_definition); self