pub enum Compositor<A, B>where
    A: Compositor,
    B: Compositor,{
    Primary(A),
    Secondary(B),
}Expand description
A compositor A with a fallback strategy B.
It works analogously to Renderer.
Variants§
Primary(A)
The primary compositing option.
Secondary(B)
The secondary (or fallback) compositing option.
Trait Implementations§
Source§impl<A, B> Compositor for Compositor<A, B>where
    A: Compositor,
    B: Compositor,
 
impl<A, B> Compositor for Compositor<A, B>where
    A: Compositor,
    B: Compositor,
Source§type Renderer = Renderer<<A as Compositor>::Renderer, <B as Compositor>::Renderer>
 
type Renderer = Renderer<<A as Compositor>::Renderer, <B as Compositor>::Renderer>
The iced renderer of the backend.
Source§type Surface = Surface<<A as Compositor>::Surface, <B as Compositor>::Surface>
 
type Surface = Surface<<A as Compositor>::Surface, <B as Compositor>::Surface>
The surface of the backend.
Source§async fn with_backend<W: Window + Clone>(
    settings: Settings,
    compatible_window: W,
    shell: Shell,
    backend: Option<&str>,
) -> Result<Self, Error>
 
async fn with_backend<W: Window + Clone>( settings: Settings, compatible_window: W, shell: Shell, backend: Option<&str>, ) -> Result<Self, Error>
Creates a new [
Compositor] with a backend preference. Read moreSource§fn create_renderer(&self) -> Self::Renderer
 
fn create_renderer(&self) -> Self::Renderer
Creates a [
Self::Renderer] for the [Compositor].Source§fn create_surface<W: Window + Clone>(
    &mut self,
    window: W,
    width: u32,
    height: u32,
) -> Self::Surface
 
fn create_surface<W: Window + Clone>( &mut self, window: W, width: u32, height: u32, ) -> Self::Surface
Crates a new 
Surface for the given window.Source§fn configure_surface(
    &mut self,
    surface: &mut Self::Surface,
    width: u32,
    height: u32,
)
 
fn configure_surface( &mut self, surface: &mut Self::Surface, width: u32, height: u32, )
Configures a new 
Surface with the given dimensions.Source§fn information(&self) -> Information
 
fn information(&self) -> Information
Returns [
Information] used by this [Compositor].Source§fn present(
    &mut self,
    renderer: &mut Self::Renderer,
    surface: &mut Self::Surface,
    viewport: &Viewport,
    background_color: Color,
    on_pre_present: impl FnOnce(),
) -> Result<(), SurfaceError>
 
fn present( &mut self, renderer: &mut Self::Renderer, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, on_pre_present: impl FnOnce(), ) -> Result<(), SurfaceError>
Auto Trait Implementations§
impl<A, B> Freeze for Compositor<A, B>
impl<A, B> RefUnwindSafe for Compositor<A, B>where
    A: RefUnwindSafe,
    B: RefUnwindSafe,
impl<A, B> Send for Compositor<A, B>
impl<A, B> Sync for Compositor<A, B>
impl<A, B> Unpin for Compositor<A, B>
impl<A, B> UnwindSafe for Compositor<A, B>where
    A: UnwindSafe,
    B: UnwindSafe,
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
§impl<T> Downcast for Twhere
    T: Any,
 
impl<T> Downcast for Twhere
    T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
 
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert 
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
 
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert 
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
 
fn as_any(&self) -> &(dyn Any + 'static)
Convert 
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
 
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert 
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
 
impl<T> DowncastSync for T
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more