Struct jaded::AnnotationIter [−][src]
pub struct AnnotationIter<'a> { /* fields omitted */ }
Utility for reading things from annotations
This is intended to offer a similar interface to the ObjectInputStream used by Java classes that implement custom readObject methods.
Implementations
impl<'a> AnnotationIter<'a>
[src]
impl<'a> AnnotationIter<'a>
[src]pub fn read_u8(&mut self) -> ConversionResult<u8>
[src]
Read byte from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_boolean(&mut self) -> ConversionResult<bool>
[src]
Read boolean from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_i16(&mut self) -> ConversionResult<i16>
[src]
Read short (i16) from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_i32(&mut self) -> ConversionResult<i32>
[src]
Read int (i32) from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_i64(&mut self) -> ConversionResult<i64>
[src]
Read long (i64) from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_f32(&mut self) -> ConversionResult<f32>
[src]
Read float (f32) from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_f64(&mut self) -> ConversionResult<f64>
[src]
Read double (f64) from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
See
pub fn read_char(&mut self) -> ConversionResult<char>
[src]
Read char from annotation
Errors
- if there is not enough data
- if the next item in the annotation is an object instead of binary data.
- if the bytes are not a valid UTF-8 character
See
pub fn read_object(&mut self) -> ConversionResult<&'a Value>
[src]
Read an object from annotation
Errors
ConversionError::UnexpectedBlockData if the next item in annotation is binary data. ConversionError::MissingAnnotations if there are no more objects in this annotation
See
pub fn read_object_as<T: FromJava>(&mut self) -> ConversionResult<T>
[src]
Read an object and convert it to a rust type
Errors
This method is the equivalent of T::from_value(read_object()?) so any errors raised by either method will be returned.
Auto Trait Implementations
impl<'a> RefUnwindSafe for AnnotationIter<'a>
impl<'a> RefUnwindSafe for AnnotationIter<'a>
impl<'a> Send for AnnotationIter<'a>
impl<'a> Send for AnnotationIter<'a>
impl<'a> Sync for AnnotationIter<'a>
impl<'a> Sync for AnnotationIter<'a>
impl<'a> Unpin for AnnotationIter<'a>
impl<'a> Unpin for AnnotationIter<'a>
impl<'a> UnwindSafe for AnnotationIter<'a>
impl<'a> UnwindSafe for AnnotationIter<'a>