pub struct UnsyncAuthor { /* private fields */ }Available on crate feature
importer only.Expand description
Represents an author that is not yet synced with the archive.
Implementations§
Source§impl UnsyncAuthor
impl UnsyncAuthor
pub fn new(name: String) -> Self
pub fn name(self, name: String) -> Self
pub fn aliases(self, aliases: Vec<UnsyncAlias>) -> Self
pub fn updated(self, updated: Option<DateTime<Utc>>) -> Self
Sourcepub fn sync<T>(
self,
manager: &PostArchiverManager<T>,
) -> Result<AuthorId, Error>where
T: PostArchiverConnection,
pub fn sync<T>(
self,
manager: &PostArchiverManager<T>,
) -> Result<AuthorId, Error>where
T: PostArchiverConnection,
Import it into the archive.
If the author already exists (by aliases), it updates their name, aliases, and updated date.
§Errors
Returns rusqlite::Error if there was an error accessing the database.
Trait Implementations§
Source§impl Clone for UnsyncAuthor
impl Clone for UnsyncAuthor
Source§fn clone(&self) -> UnsyncAuthor
fn clone(&self) -> UnsyncAuthor
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 UnsyncAuthor
impl Debug for UnsyncAuthor
Source§impl Hash for UnsyncAuthor
impl Hash for UnsyncAuthor
Source§impl PartialEq for UnsyncAuthor
impl PartialEq for UnsyncAuthor
impl Eq for UnsyncAuthor
impl StructuralPartialEq for UnsyncAuthor
Auto Trait Implementations§
impl Freeze for UnsyncAuthor
impl RefUnwindSafe for UnsyncAuthor
impl Send for UnsyncAuthor
impl Sync for UnsyncAuthor
impl Unpin for UnsyncAuthor
impl UnwindSafe for UnsyncAuthor
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