pub struct RuleFields {
pub property: &'static str,
pub method: &'static str,
pub value: String,
pub value2: String,
pub unit: &'static str,
pub width: String,
pub height: String,
}Expand description
A rule’s editable fields, all as text.
Fields§
§property: &'static str§method: &'static str§value: StringThe value, or the first number, date (YYYY-MM-DD, local) or day
count. Lists are comma-separated.
value2: StringThe second number or date, for between.
unit: &'static str"" for a property without units.
width: StringThe custom shape’s ratio.
height: StringImplementations§
Source§impl RuleFields
impl RuleFields
Sourcepub fn new(property: &'static str) -> RuleFields
pub fn new(property: &'static str) -> RuleFields
A fresh rule on property with its default method and value.
pub fn kind(&self) -> Kind
Sourcepub fn set_property(&mut self, property: &'static str)
pub fn set_property(&mut self, property: &'static str)
Switches to another property, resetting the method and value as Eagle’s dialog does.
Sourcepub fn set_method(&mut self, method: &'static str)
pub fn set_method(&mut self, method: &'static str)
Switches the method. A date rule moving to or from within swaps a
date for a day count, so its value starts over (30 days, as in
Eagle); other values carry over.
Trait Implementations§
Source§impl Clone for RuleFields
impl Clone for RuleFields
Source§fn clone(&self) -> RuleFields
fn clone(&self) -> RuleFields
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuleFields
impl Debug for RuleFields
Source§impl Default for RuleFields
impl Default for RuleFields
Source§impl PartialEq for RuleFields
impl PartialEq for RuleFields
impl StructuralPartialEq for RuleFields
Auto Trait Implementations§
impl Freeze for RuleFields
impl RefUnwindSafe for RuleFields
impl Send for RuleFields
impl Sync for RuleFields
impl Unpin for RuleFields
impl UnsafeUnpin for RuleFields
impl UnwindSafe for RuleFields
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().