pub struct FriendlyCodeSnippet { /* private fields */ }
Implementations§
Source§impl FriendlyCodeSnippet
impl FriendlyCodeSnippet
pub fn new<S: Into<String>>(file_contents: S) -> Self
pub fn set_file_path<S: Into<String>>(self, file_path: S) -> Self
pub fn index_start(self, index_start: usize) -> Self
pub fn index_end(self, index_end: usize) -> Self
pub fn line_start(self, line_start: usize) -> Self
pub fn line_end(self, line_end: usize) -> Self
pub fn kind(self, kind: HighlightKind) -> Self
pub fn caption<S: Into<String>>(self, caption: S) -> Self
Trait Implementations§
Source§impl Clone for FriendlyCodeSnippet
impl Clone for FriendlyCodeSnippet
Source§fn clone(&self) -> FriendlyCodeSnippet
fn clone(&self) -> FriendlyCodeSnippet
Returns a duplicate of the value. Read more
1.0.0 · 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 FriendlyCodeSnippet
impl Debug for FriendlyCodeSnippet
Source§impl PartialEq for FriendlyCodeSnippet
impl PartialEq for FriendlyCodeSnippet
impl StructuralPartialEq for FriendlyCodeSnippet
Auto Trait Implementations§
impl Freeze for FriendlyCodeSnippet
impl RefUnwindSafe for FriendlyCodeSnippet
impl Send for FriendlyCodeSnippet
impl Sync for FriendlyCodeSnippet
impl Unpin for FriendlyCodeSnippet
impl UnwindSafe for FriendlyCodeSnippet
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