pub trait ThriftAnnotations: 'static {
fn get_structured_annotation<T: Sized + 'static>() -> Option<T> {
None
}
fn get_field_structured_annotation<T: Sized + 'static>(_field_id: i16) -> Option<T> {
None
}
}
pub trait MaybeThriftAnnotations: 'static {
fn get_structured_annotation<T: Sized + 'static>() -> Option<T> {
None
}
fn get_field_structured_annotation<T: Sized + 'static>(_field_id: i16) -> Option<T> {
None
}
}
impl<S: ThriftAnnotations> MaybeThriftAnnotations for S {
fn get_structured_annotation<T: Sized + 'static>() -> Option<T> {
<S as ThriftAnnotations>::get_structured_annotation::<T>()
}
fn get_field_structured_annotation<T: Sized + 'static>(field_id: i16) -> Option<T> {
<S as ThriftAnnotations>::get_field_structured_annotation::<T>(field_id)
}
}
impl MaybeThriftAnnotations for () {}