pub struct Author<'a> { /* private fields */ }Expand description
This enum renders (nid, alias) in terminal depending on user variant.
Implementations§
Source§impl<'a> Author<'a>
impl<'a> Author<'a>
pub fn new(nid: &'a NodeId, profile: &Profile, verbose: bool) -> Author<'a>
pub fn alias(&self) -> Option<Label>
pub fn you(&self) -> Option<Label>
Sourcepub fn labels(self) -> (Label, Label)
pub fn labels(self) -> (Label, Label)
Get the labels of the Author. The labels can take the following forms:
(<alias>, (you))– theAuthoris the local peer and has an alias(<did>, (you))– theAuthoris the local peer and has no alias(<alias>, <did>)– theAuthoris another peer and has an alias(<blank>, <did>)– theAuthoris another peer and has no alias
pub fn line(self) -> Line
Auto Trait Implementations§
impl<'a> Freeze for Author<'a>
impl<'a> RefUnwindSafe for Author<'a>
impl<'a> Send for Author<'a>
impl<'a> Sync for Author<'a>
impl<'a> Unpin for Author<'a>
impl<'a> UnwindSafe for Author<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more