pub enum TryConstruct {
Discard,
UseDefault,
Trim,
}Expand description
The three behaviours §7.3.1.2.1.12 names.
The annotation’s own parameter defaults to USE_DEFAULT, so a bare
@try_construct is not an absent one: an absent annotation is
DISCARD (§7.2.2.7) and a valueless one is USE_DEFAULT
(§7.3.1.2.1.12). Which of the two a declaration wrote is the front
end’s question; by the time it reaches here it is one of these.
Variants§
Discard
The whole sample is discarded. The default when no annotation is written.
UseDefault
The member takes its default and the sample survives.
Trim
An over-long string, wstring, sequence or map is truncated to what the receiver’s type holds.
Trait Implementations§
Source§impl Clone for TryConstruct
impl Clone for TryConstruct
impl Copy for TryConstruct
Source§impl Debug for TryConstruct
impl Debug for TryConstruct
impl Eq for TryConstruct
Source§impl Hash for TryConstruct
impl Hash for TryConstruct
Source§impl PartialEq for TryConstruct
impl PartialEq for TryConstruct
impl StructuralPartialEq for TryConstruct
Auto Trait Implementations§
impl Freeze for TryConstruct
impl RefUnwindSafe for TryConstruct
impl Send for TryConstruct
impl Sync for TryConstruct
impl Unpin for TryConstruct
impl UnsafeUnpin for TryConstruct
impl UnwindSafe for TryConstruct
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