pub struct Control {
pub kind: ControlKind,
pub name: Option<String>,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub style_name: Option<String>,
pub style: Style,
pub visible: Option<String>,
pub rules: Vec<FormattingRule>,
}Expand description
A printable element of a band.
Fields§
§kind: ControlKindWhat the control is and its content.
name: Option<String>An optional name, shown in the designer and in error messages.
x: f32Left edge, from the band’s left.
y: f32Top edge, from the band’s top.
width: f32Width.
height: f32Height before growing.
style_name: Option<String>A named style from Report::styles.
style: StyleStyle settings on top of the named style.
visible: Option<String>The control is left out when this is false.
rules: Vec<FormattingRule>Conditional formatting, applied in order when the condition holds.
Implementations§
Source§impl Control
impl Control
Sourcepub fn chart(
kind: ChartKind,
argument: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn chart( kind: ChartKind, argument: impl Into<String>, value: impl Into<String>, ) -> Self
A chart: one series of value per argument.
Sourcepub fn barcode(symbology: Symbology, expression: impl Into<String>) -> Self
pub fn barcode(symbology: Symbology, expression: impl Into<String>) -> Self
A barcode showing the value of expression.
Sourcepub fn picture(source: impl Into<String>) -> Self
pub fn picture(source: impl Into<String>) -> Self
A picture from a data: address or base64 text.
Sourcepub fn link(text: impl Into<String>, url: impl Into<String>) -> Self
pub fn link(text: impl Into<String>, url: impl Into<String>) -> Self
Text that opens url when clicked.
Sourcepub fn bookmark(expression: impl Into<String>, level: u32) -> Self
pub fn bookmark(expression: impl Into<String>, level: u32) -> Self
An outline entry showing the value of expression, at level.
Sourcepub fn at(self, x: f32, y: f32, width: f32, height: f32) -> Self
pub fn at(self, x: f32, y: f32, width: f32, height: f32) -> Self
Positions and sizes the control.
Sourcepub fn style_name(self, name: &str) -> Self
pub fn style_name(self, name: &str) -> Self
Uses a named style.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Control
impl<'de> Deserialize<'de> for Control
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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