pub enum Source {
File {
name: String,
contents: String,
},
Unknown,
}
Expand description
Different sources of text data.
Variants§
File
Source::File { name, contents }
is a text file with name name
and
contents contents
.
Invariant: if two Source::File
s have the same name
, they must
represent the same file. For this reason, it is recommended to use
fully-qualified paths for name
.
Unknown
Implementations§
Trait Implementations§
impl Eq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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