pub struct ItemBuilder<A, B, C, D, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,{ /* private fields */ }Expand description
Builder for an InputItem, OutputItem, or FeatureItem.
Only flags that differ from the default need to be set, the most common invocations of this builder are a variation of:
let item: InputItem = ItemBuilder::new()
.variable()
.absolute()
.input();
let item: OutputItem = ItemBuilder::new()
.constant()
.output();
let item: FeatureItem = ItemBuilder::new()
.array()
.relative()
.feature();Implementations§
Source§impl ItemBuilder<IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined>
impl ItemBuilder<IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined>
Sourcepub fn new() -> ItemBuilder<IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined>
pub fn new() -> ItemBuilder<IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined, IBUndefined>
Create a new builder for an InputItem, OutputItem or FeatureItem. Each flag on the builder may only be set once, complete the item by calling ItemBuilder::input(), ItemBuilder::output() or ItemBuilder::feature().
let item: InputItem = ItemBuilder::new()
.data()
.variable()
.absolute()
.input();Where an item flag is not set the default (unset) is used. See Section 6.2.2.5 “Input, Output, and Feature Items” for details on default flags.
Source§impl<A, B, C, D, E, F, G, H, I> ItemBuilder<A, B, C, D, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, B, C, D, E, F, G, H, I> ItemBuilder<A, B, C, D, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn input(self) -> InputItem
pub fn input(self) -> InputItem
Convert the current builder to an InputItem.
let item: InputItem = ItemBuilder::new()
.data()
.variable()
.absolute()
.input();
assert!(item.is_data() && !item.is_constant());
assert!(item.is_variable() && !item.is_array());
assert!(item.is_absolute() && !item.is_relative());Sourcepub fn output(self) -> OutputItem
pub fn output(self) -> OutputItem
Convert the current builder to an OutputItem.
let item: OutputItem = ItemBuilder::new()
.data()
.variable()
.absolute()
.output();
assert!(item.is_data() && !item.is_constant());
assert!(item.is_variable() && !item.is_array());
assert!(item.is_absolute() && !item.is_relative());Sourcepub fn feature(self) -> FeatureItem
pub fn feature(self) -> FeatureItem
Convert the current builder to a FeatureItem.
let item: FeatureItem = ItemBuilder::new()
.data()
.variable()
.absolute()
.feature();
assert!(item.is_data() && !item.is_constant());
assert!(item.is_variable() && !item.is_array());
assert!(item.is_absolute() && !item.is_relative());Source§impl<B, C, D, E, F, G, H, I> ItemBuilder<IBUndefined, B, C, D, E, F, G, H, I>where
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<B, C, D, E, F, G, H, I> ItemBuilder<IBUndefined, B, C, D, E, F, G, H, I>where
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn constant(self) -> ItemBuilder<IBConstant, B, C, D, E, F, G, H, I>
pub fn constant(self) -> ItemBuilder<IBConstant, B, C, D, E, F, G, H, I>
Set the item data to be constant.
Sourcepub fn data(self) -> ItemBuilder<IBData, B, C, D, E, F, G, H, I>
pub fn data(self) -> ItemBuilder<IBData, B, C, D, E, F, G, H, I>
Set the item data to be data. This is the default.
Source§impl<A, C, D, E, F, G, H, I> ItemBuilder<A, IBUndefined, C, D, E, F, G, H, I>where
A: IBSData,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, C, D, E, F, G, H, I> ItemBuilder<A, IBUndefined, C, D, E, F, G, H, I>where
A: IBSData,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn variable(self) -> ItemBuilder<A, IBVariable, C, D, E, F, G, H, I>
pub fn variable(self) -> ItemBuilder<A, IBVariable, C, D, E, F, G, H, I>
Set the item data to be a variable
Sourcepub fn array(self) -> ItemBuilder<A, IBArray, C, D, E, F, G, H, I>
pub fn array(self) -> ItemBuilder<A, IBArray, C, D, E, F, G, H, I>
Set the item data to be an array. This is the default.
Source§impl<A, B, D, E, F, G, H, I> ItemBuilder<A, B, IBUndefined, D, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, B, D, E, F, G, H, I> ItemBuilder<A, B, IBUndefined, D, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn absolute(self) -> ItemBuilder<A, B, IBAbsolute, D, E, F, G, H, I>
pub fn absolute(self) -> ItemBuilder<A, B, IBAbsolute, D, E, F, G, H, I>
Set the item data to represent absolute values. This is the default.
Sourcepub fn relative(self) -> ItemBuilder<A, B, IBRelative, D, E, F, G, H, I>
pub fn relative(self) -> ItemBuilder<A, B, IBRelative, D, E, F, G, H, I>
Set the item data to represent relative values.
Source§impl<A, B, C, E, F, G, H, I> ItemBuilder<A, B, C, IBUndefined, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, B, C, E, F, G, H, I> ItemBuilder<A, B, C, IBUndefined, E, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn wrap(self) -> ItemBuilder<A, B, C, IBWrap, E, F, G, H, I>
pub fn wrap(self) -> ItemBuilder<A, B, C, IBWrap, E, F, G, H, I>
Set the item data to wrap at the logical extents.
Sourcepub fn nowrap(self) -> ItemBuilder<A, B, C, IBNoWrap, E, F, G, H, I>
pub fn nowrap(self) -> ItemBuilder<A, B, C, IBNoWrap, E, F, G, H, I>
Set the item data to not wrap at the logical extents. This is the default.
Source§impl<A, B, C, D, F, G, H, I> ItemBuilder<A, B, C, D, IBUndefined, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, B, C, D, F, G, H, I> ItemBuilder<A, B, C, D, IBUndefined, F, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
F: IBSPref,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn linear(self) -> ItemBuilder<A, B, C, D, IBLinear, F, G, H, I>
pub fn linear(self) -> ItemBuilder<A, B, C, D, IBLinear, F, G, H, I>
Set the item data to be linear.
Sourcepub fn nonlinear(self) -> ItemBuilder<A, B, C, D, IBNonLinear, F, G, H, I>
pub fn nonlinear(self) -> ItemBuilder<A, B, C, D, IBNonLinear, F, G, H, I>
Set the item data to be non linear. This is the default.
Source§impl<A, B, C, D, E, G, H, I> ItemBuilder<A, B, C, D, E, IBUndefined, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
G: IBSNull,
H: IBSBit,
I: IBSVol,
impl<A, B, C, D, E, G, H, I> ItemBuilder<A, B, C, D, E, IBUndefined, G, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
G: IBSNull,
H: IBSBit,
I: IBSVol,
Sourcepub fn preferred_state(self) -> ItemBuilder<A, B, C, D, E, IBPreferred, G, H, I>
pub fn preferred_state(self) -> ItemBuilder<A, B, C, D, E, IBPreferred, G, H, I>
Set the item data to have a preferred state.
Sourcepub fn no_preferred_state(
self,
) -> ItemBuilder<A, B, C, D, E, IBNoPreferred, G, H, I>
pub fn no_preferred_state( self, ) -> ItemBuilder<A, B, C, D, E, IBNoPreferred, G, H, I>
Set the item data to not have a preferred state. This is the default.
Source§impl<A, B, C, D, E, F, H, I> ItemBuilder<A, B, C, D, E, F, IBUndefined, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
H: IBSBit,
I: IBSVol,
impl<A, B, C, D, E, F, H, I> ItemBuilder<A, B, C, D, E, F, IBUndefined, H, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
H: IBSBit,
I: IBSVol,
Sourcepub fn null(self) -> ItemBuilder<A, B, C, D, E, F, IBNull, H, I>
pub fn null(self) -> ItemBuilder<A, B, C, D, E, F, IBNull, H, I>
Set the item data to have a null state
Sourcepub fn no_null(self) -> ItemBuilder<A, B, C, D, E, F, IBNoNull, H, I>
pub fn no_null(self) -> ItemBuilder<A, B, C, D, E, F, IBNoNull, H, I>
Set the item data to not have a null state. This is the default.
Source§impl<A, B, C, D, E, F, G, I> ItemBuilder<A, B, C, D, E, F, G, IBUndefined, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
I: IBSVol,
impl<A, B, C, D, E, F, G, I> ItemBuilder<A, B, C, D, E, F, G, IBUndefined, I>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
I: IBSVol,
Sourcepub fn bitfield(self) -> ItemBuilder<A, B, C, D, E, F, G, IBBitfield, I>
pub fn bitfield(self) -> ItemBuilder<A, B, C, D, E, F, G, IBBitfield, I>
Set the item data to be a bit field. This is the default.
Sourcepub fn buffered_bytes(self) -> ItemBuilder<A, B, C, D, E, F, G, IBBuffered, I>
pub fn buffered_bytes(self) -> ItemBuilder<A, B, C, D, E, F, G, IBBuffered, I>
Set the item data to be stream of buffered bytes.
Source§impl<A, B, C, D, E, F, G, H> ItemBuilder<A, B, C, D, E, F, G, H, IBUndefined>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
impl<A, B, C, D, E, F, G, H> ItemBuilder<A, B, C, D, E, F, G, H, IBUndefined>where
A: IBSData,
B: IBSArr,
C: IBSAbs,
D: IBSWrap,
E: IBSLin,
F: IBSPref,
G: IBSNull,
H: IBSBit,
Sourcepub fn volatile(self) -> ItemBuilder<A, B, C, D, E, F, G, H, IBVolatile>
pub fn volatile(self) -> ItemBuilder<A, B, C, D, E, F, G, H, IBVolatile>
Set the item data to be volatile.
If the builder is later converted to an InputItem this flag is ignored.
Sourcepub fn non_volatile(self) -> ItemBuilder<A, B, C, D, E, F, G, H, IBNonVolatile>
pub fn non_volatile(self) -> ItemBuilder<A, B, C, D, E, F, G, H, IBNonVolatile>
Set the item data to be stream of buffered bytes.
If the builder is later converted to an InputItem this flag is ignored.