pub struct UeConf<'a> {
pub action: Actions,
pub path: &'a str,
pub identifier: &'a str,
pub x: u16,
pub y: u16,
pub width: Option<u16>,
pub height: Option<u16>,
pub scaler: Option<Scalers>,
pub draw: Option<bool>,
pub synchronously_draw: Option<bool>,
pub scaling_position_x: Option<f32>,
pub scaling_position_y: Option<f32>,
}Expand description
The configuration struct for the image drawing.
identifier and path are the only required fields and will throw a panic if left empty.
By default x and y will be set to 0 and all other option will be set to None
§Example
use ueberzug::UeConf;
// The minimum required for proper config struct.
let conf = UeConf{
identifier:"carb",
path:"ferris.png",
..Default::default()
};
// More specific option with starting x and y cordinates with width and height
let conf = UeConf{
identifier:"crab",
path:"ferris.png",
x:20,
y:5,
width:Some(30),
height:Some(30),
..Default::default()
};Fields§
§action: Actions§path: &'a str§identifier: &'a str§x: u16§y: u16§width: Option<u16>§height: Option<u16>§scaler: Option<Scalers>§draw: Option<bool>§synchronously_draw: Option<bool>§scaling_position_x: Option<f32>§scaling_position_y: Option<f32>Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for UeConf<'a>
impl<'a> RefUnwindSafe for UeConf<'a>
impl<'a> Send for UeConf<'a>
impl<'a> Sync for UeConf<'a>
impl<'a> Unpin for UeConf<'a>
impl<'a> UnwindSafe for UeConf<'a>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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