pub struct GeneratedUlimit { /* private fields */ }Expand description
One ordered generated service limit.
Implementations§
Source§impl GeneratedUlimit
impl GeneratedUlimit
Sourcepub fn new(
name: impl Into<String>,
value: GeneratedUlimitValue,
) -> Result<Self, GenerationError>
pub fn new( name: impl Into<String>, value: GeneratedUlimitValue, ) -> Result<Self, GenerationError>
Creates one validated named generated limit.
§Errors
Rejects non-lowercase names, missing range members, deferred/multiline/NUL-bearing values,
and values other than -1 or non-negative ASCII decimals.
Sourcepub fn single(
name: impl Into<String>,
value: GeneratedString,
) -> Result<Self, GenerationError>
pub fn single( name: impl Into<String>, value: GeneratedString, ) -> Result<Self, GenerationError>
Sourcepub fn range(
name: impl Into<String>,
soft: GeneratedString,
hard: GeneratedString,
) -> Result<Self, GenerationError>
pub fn range( name: impl Into<String>, soft: GeneratedString, hard: GeneratedString, ) -> Result<Self, GenerationError>
Sourcepub const fn value(&self) -> &GeneratedUlimitValue
pub const fn value(&self) -> &GeneratedUlimitValue
Returns the selected single or soft/hard form.
Trait Implementations§
Source§impl Clone for GeneratedUlimit
impl Clone for GeneratedUlimit
Source§fn clone(&self) -> GeneratedUlimit
fn clone(&self) -> GeneratedUlimit
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 GeneratedUlimit
impl Debug for GeneratedUlimit
impl Eq for GeneratedUlimit
Source§impl PartialEq for GeneratedUlimit
impl PartialEq for GeneratedUlimit
impl StructuralPartialEq for GeneratedUlimit
Auto Trait Implementations§
impl Freeze for GeneratedUlimit
impl RefUnwindSafe for GeneratedUlimit
impl Send for GeneratedUlimit
impl Sync for GeneratedUlimit
impl Unpin for GeneratedUlimit
impl UnsafeUnpin for GeneratedUlimit
impl UnwindSafe for GeneratedUlimit
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