pub enum Annotation {
Show 13 variants
Text(TextAnnotation),
Highlight(HighlightAnnotation),
Underline(UnderlineAnnotation),
StrikeOut(StrikeOutAnnotation),
Squiggly(SquigglyAnnotation),
FreeText(FreeTextAnnotation),
Square(SquareAnnotation),
Circle(CircleAnnotation),
Line(LineAnnotation),
Polygon(PolygonAnnotation),
Ink(InkAnnotation),
Stamp(StampAnnotation),
Popup(PopupAnnotation),
}Expand description
枚举所有支持的注释类型。
这是对外最常用的统一入口:
不管实际是文本、高亮、线条还是图章,最后都能先装进 Annotation 里。
统一收口的注释总类型。
当前项目支持的各种注释,最后都会被包进这个枚举里。
这样外层逻辑就不用到处分别处理十几种结构体,
而是可以先拿一个统一的 Annotation,
再根据类型做分发。
Variants§
Text(TextAnnotation)
Highlight(HighlightAnnotation)
Underline(UnderlineAnnotation)
StrikeOut(StrikeOutAnnotation)
Squiggly(SquigglyAnnotation)
FreeText(FreeTextAnnotation)
Square(SquareAnnotation)
Circle(CircleAnnotation)
Line(LineAnnotation)
Polygon(PolygonAnnotation)
Ink(InkAnnotation)
Stamp(StampAnnotation)
Popup(PopupAnnotation)
Implementations§
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
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 Annotation
impl Debug for Annotation
Source§impl<'de> Deserialize<'de> for Annotation
impl<'de> Deserialize<'de> for Annotation
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
Auto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin for Annotation
impl UnwindSafe for Annotation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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