pub struct InputAnnotationBuilder { /* private fields */ }Expand description
Builder for InputAnnotation.
Implementations§
Source§impl InputAnnotationBuilder
impl InputAnnotationBuilder
Sourcepub fn uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
URI that this annotation is attached to.
Can be a URL (a web page address) or a URN representing another kind of resource such as DOI (Digital Object Identifier) or a PDF fingerprint.
Sourcepub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Annotation text / comment given by user
This is NOT the selected text on the web-page
Tags attached to the annotation
Sourcepub fn document(&mut self, value: Document) -> &mut Self
pub fn document(&mut self, value: Document) -> &mut Self
Further metadata about the target document
Sourcepub fn group<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn group<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The unique identifier for the annotation’s group.
If an annotation is a reply to another
annotation (see references), this field will be ignored —
replies belong to the same group as their parent annotations.
Sourcepub fn target(&mut self, value: Target) -> &mut Self
pub fn target(&mut self, value: Target) -> &mut Self
Which part of the document does the annotation target?
If left as default then the annotation is linked to the whole page.
Sourcepub fn references(&mut self, value: Vec<String>) -> &mut Self
pub fn references(&mut self, value: Vec<String>) -> &mut Self
Annotation IDs for any annotations this annotation references (e.g. is a reply to)
Sourcepub fn builder(&self) -> Result<InputAnnotation, InputAnnotationBuilderError>
pub fn builder(&self) -> Result<InputAnnotation, InputAnnotationBuilderError>
Source§impl InputAnnotationBuilder
impl InputAnnotationBuilder
Sourcepub fn build(&self) -> Result<InputAnnotation, HypothesisError>
pub fn build(&self) -> Result<InputAnnotation, HypothesisError>
Builds a new InputAnnotation.
Trait Implementations§
Source§impl Clone for InputAnnotationBuilder
impl Clone for InputAnnotationBuilder
Source§fn clone(&self) -> InputAnnotationBuilder
fn clone(&self) -> InputAnnotationBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more