pub enum TryResource {
Decl(LocalVarDeclStmt),
VarRef(Ident),
}Expand description
A resource in a try-with-resources statement.
Variants§
Decl(LocalVarDeclStmt)
A variable declaration: BufferedReader br = new BufferedReader(...)
VarRef(Ident)
A final variable reference: br (Java 9+)
Trait Implementations§
Source§impl Clone for TryResource
impl Clone for TryResource
Source§fn clone(&self) -> TryResource
fn clone(&self) -> TryResource
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 TryResource
impl Debug for TryResource
impl Eq for TryResource
Source§impl Hash for TryResource
impl Hash for TryResource
Source§impl PartialEq for TryResource
impl PartialEq for TryResource
Source§fn eq(&self, other: &TryResource) -> bool
fn eq(&self, other: &TryResource) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TryResource
Auto Trait Implementations§
impl Freeze for TryResource
impl RefUnwindSafe for TryResource
impl Send for TryResource
impl Sync for TryResource
impl Unpin for TryResource
impl UnsafeUnpin for TryResource
impl UnwindSafe for TryResource
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