Enum hypothesis::cli::AnnotationsCommand[][src]

pub enum AnnotationsCommand {
    Create {
        annotation: InputAnnotation,
        file: Option<PathBuf>,
    },
    Update {
        id: String,
        annotation: InputAnnotation,
        file: Option<PathBuf>,
    },
    Search {
        query: SearchQuery,
        file: Option<PathBuf>,
    },
    Fetch {
        id: String,
        file: Option<PathBuf>,
    },
    Delete {
        id: String,
    },
    Flag {
        id: String,
    },
    Hide {
        id: String,
    },
    Show {
        id: String,
    },
}

Variants

Create

Create a new annotation (TODO: add Target somehow)

Fields of Create

annotation: InputAnnotationfile: Option<PathBuf>

write created annotation to this file in JSON format

Update

Update an existing annotation

Fields of Update

id: String

unique ID of the annotation to update

annotation: InputAnnotationfile: Option<PathBuf>

write updated annotation to this file in JSON format

Search

Search for annotations with optional filters

Fields of Search

query: SearchQueryfile: Option<PathBuf>

json file to write search results to, writes to stdout if not given

Fetch

Fetch annotation by ID

Fields of Fetch

id: String

unique ID of the annotation to fetch

file: Option<PathBuf>

json file to write annotation to, writes to stdout if not given

Delete

Delete annotation by ID

Fields of Delete

id: String

unique ID of the annotation to delete

Flag

Flag an annotation

Flag an annotation for review (moderation). The moderator of the group containing the annotation will be notified of the flag and can decide whether or not to hide the annotation. Note that flags persist and cannot be removed once they are set.

Fields of Flag

id: String

unique ID of the annotation to flag

Hide

Hide an annotation

Hide an annotation. The authenticated user needs to have the moderate permission for the group that contains the annotation — this permission is granted to the user who created the group.

Fields of Hide

id: String

unique ID of the annotation to hide

Show

Show an annotation

Show/“un-hide” an annotation. The authenticated user needs to have the moderate permission for the group that contains the annotation—this permission is granted to the user who created the group.

Fields of Show

id: String

unique ID of the annotation to show

Trait Implementations

impl Debug for AnnotationsCommand[src]

impl StructOpt for AnnotationsCommand[src]

impl StructOptInternal for AnnotationsCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.