pub struct PasswordRequiredError {
pub error: String,
pub code: Option<String>,
pub requires_password: bool,
pub invalid_password: Option<bool>,
}Expand description
PasswordRequiredError : Returned by GET /public/notes/{token} when the note is password-protected. requiresPassword is always true in this response; invalidPassword is true only when a password was supplied and rejected.
Fields§
§error: StringHuman-readable error message.
code: Option<String>Machine-readable error code. Stable across releases for the canonical codes (ambiguous_account, no_notes_provider, note_not_found). Absent for generic errors.
requires_password: bool§invalid_password: Option<bool>Implementations§
Source§impl PasswordRequiredError
impl PasswordRequiredError
Sourcepub fn new(error: String, requires_password: bool) -> PasswordRequiredError
pub fn new(error: String, requires_password: bool) -> PasswordRequiredError
Returned by GET /public/notes/{token} when the note is password-protected. requiresPassword is always true in this response; invalidPassword is true only when a password was supplied and rejected.
Trait Implementations§
Source§impl Clone for PasswordRequiredError
impl Clone for PasswordRequiredError
Source§fn clone(&self) -> PasswordRequiredError
fn clone(&self) -> PasswordRequiredError
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 PasswordRequiredError
impl Debug for PasswordRequiredError
Source§impl Default for PasswordRequiredError
impl Default for PasswordRequiredError
Source§fn default() -> PasswordRequiredError
fn default() -> PasswordRequiredError
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PasswordRequiredError
impl<'de> Deserialize<'de> for PasswordRequiredError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PasswordRequiredError
impl PartialEq for PasswordRequiredError
Source§fn eq(&self, other: &PasswordRequiredError) -> bool
fn eq(&self, other: &PasswordRequiredError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PasswordRequiredError
impl Serialize for PasswordRequiredError
impl StructuralPartialEq for PasswordRequiredError
Auto Trait Implementations§
impl Freeze for PasswordRequiredError
impl RefUnwindSafe for PasswordRequiredError
impl Send for PasswordRequiredError
impl Sync for PasswordRequiredError
impl Unpin for PasswordRequiredError
impl UnsafeUnpin for PasswordRequiredError
impl UnwindSafe for PasswordRequiredError
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