pub struct EntryShape {
pub format: Option<FormatSpec>,
pub length: Option<usize>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
}Expand description
What an enter_value or enter_secret step says about the value it asks
for, as the with: fields spell it.
One place turns these into a ValidatorSpec, so rite check and the
running step cannot disagree about which combinations mean something.
Fields§
§format: Option<FormatSpec>format:, what kind of value it is.
length: Option<usize>length:, an exact length.
min_length: Option<usize>min_length:.
max_length: Option<usize>max_length:.
Implementations§
Source§impl EntryShape
impl EntryShape
Sourcepub fn validator(&self) -> Result<ValidatorSpec, String>
pub fn validator(&self) -> Result<ValidatorSpec, String>
The rule these fields describe.
Nothing given asks only for a non-empty value. A pattern says the whole shape, so a length beside it is refused rather than combined with it in a way the author would have to guess at. Lengths count the format’s own units: characters for text, bytes for an encoding.
§Errors
Returns why the fields do not describe one rule, phrased for the ceremony author.
Trait Implementations§
Source§impl Clone for EntryShape
impl Clone for EntryShape
Source§impl Debug for EntryShape
impl Debug for EntryShape
Source§impl Default for EntryShape
impl Default for EntryShape
impl Eq for EntryShape
Source§impl PartialEq for EntryShape
impl PartialEq for EntryShape
impl StructuralPartialEq for EntryShape
Auto Trait Implementations§
impl Freeze for EntryShape
impl RefUnwindSafe for EntryShape
impl Send for EntryShape
impl Sync for EntryShape
impl Unpin for EntryShape
impl UnsafeUnpin for EntryShape
impl UnwindSafe for EntryShape
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.