pub struct Attr<'a> {
pub name: &'a str,
pub kind: AttrKind<'a>,
pub default: DefaultValue<'a>,
pub map: Option<&'a [EnumValue<'a>]>,
pub nodefault: bool,
}Fields§
§name: &'a str§kind: AttrKind<'a>§default: DefaultValue<'a>§map: Option<&'a [EnumValue<'a>]>§nodefault: boolImplementations§
Source§impl<'a> Attr<'a>
impl<'a> Attr<'a>
pub fn integer(name: &'a str, target: &'a mut i32) -> Self
pub fn integers(name: &'a str, target: &'a mut [i32]) -> Self
pub fn uinteger(name: &'a str, target: &'a mut u32) -> Self
pub fn uintegers(name: &'a str, target: &'a mut [u32]) -> Self
pub fn short(name: &'a str, target: &'a mut i16) -> Self
pub fn shorts(name: &'a str, target: &'a mut [i16]) -> Self
pub fn ushort(name: &'a str, target: &'a mut u16) -> Self
pub fn ushorts(name: &'a str, target: &'a mut [u16]) -> Self
Source§impl<'a> Attr<'a>
impl<'a> Attr<'a>
pub fn real(name: &'a str, target: &'a mut f64) -> Self
pub fn reals(name: &'a str, target: &'a mut [f64]) -> Self
pub fn string(name: &'a str, target: &'a mut [u8]) -> Self
pub fn boolean(name: &'a str, target: &'a mut bool) -> Self
pub fn booleans(name: &'a str, target: &'a mut [bool]) -> Self
pub fn character(name: &'a str, target: &'a mut u8) -> Self
pub fn characters(name: &'a str, target: &'a mut [u8]) -> Self
Source§impl<'a> Attr<'a>
impl<'a> Attr<'a>
pub fn time(name: &'a str, target: &'a mut f64) -> Self
pub fn object(name: &'a str, attrs: &'a mut [Attr<'a>]) -> Self
pub fn array(name: &'a str, array: Array<'a>) -> Self
pub fn check(name: &'a str, expected: &'a str) -> Self
pub fn ignore_any() -> Self
pub fn with_default(self, default: DefaultValue<'a>) -> Self
pub fn with_map(self, map: &'a [EnumValue<'a>]) -> Self
pub fn nodefault(self) -> Self
Auto Trait Implementations§
impl<'a> Freeze for Attr<'a>
impl<'a> !RefUnwindSafe for Attr<'a>
impl<'a> !Send for Attr<'a>
impl<'a> !Sync for Attr<'a>
impl<'a> Unpin for Attr<'a>
impl<'a> UnsafeUnpin for Attr<'a>
impl<'a> !UnwindSafe for Attr<'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