pub enum Refusal {
NotBase64,
TooLarge,
Unsupported,
Dimensions,
Damaged,
}Expand description
Why an upload is not a logo. Each has its own status and fixed message at the route; none carries the decoder’s words or the upload’s bytes (the review’s A8).
Variants§
NotBase64
Not strict standard base64 (padded, no whitespace, no data:).
TooLarge
Over MAX_UPLOAD decoded, or over the stored cap once re-encoded.
Unsupported
Not a PNG by its signature: SVG, WebP, JPEG, GIF, anything else.
Dimensions
Over MAX_SIDE either way (a side of 0 is refused by the decoder
first, as Damaged).
Damaged
The decoder refused it.
Trait Implementations§
impl Copy for Refusal
impl Eq for Refusal
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Freeze for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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