pub trait Layout: 'static {
type Error: StdError;
const NAMESPACE: &'static str;
// Required methods
fn user_cmd(
&mut self,
cmd: String,
tags: Option<u32>,
output: &str,
) -> Result<(), Self::Error>;
fn generate_layout(
&mut self,
view_count: u32,
usable_width: u32,
usable_height: u32,
tags: u32,
output: &str,
) -> Result<GeneratedLayout, Self::Error>;
}Expand description
This trait represents a layout generator implementation.
Required Associated Constants§
Sourceconst NAMESPACE: &'static str
const NAMESPACE: &'static str
The namespace is used by the compositor to distinguish between layout generators. Two separate
clients may not share a namespace. Otherwise, run will return Error::NamespaceInUse.
Required Associated Types§
Sourcetype Error: StdError
type Error: StdError
The error type of user_cmd and generate_layout
functions. Use Infallible if you don’t need it.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".