pub type Result<T> = Result<T, Error>;
Expand description
An alias of Result
specific to attribute parsing.
Aliased Type§
enum Result<T> {
Ok(T),
Err(Error),
}
Variants§
Trait Implementations§
source§impl<T: FromGenerics> FromGenerics for Result<T>
impl<T: FromGenerics> FromGenerics for Result<T>
fn from_generics(generics: &Generics) -> Result<Self>
source§impl<T: FromMeta> FromMeta for Result<T>
impl<T: FromMeta> FromMeta for Result<T>
source§fn from_none() -> Option<Self>
fn from_none() -> Option<Self>
When a field is omitted from a parent meta-item,
from_none
is used to attempt
recovery before a missing field error is generated. Read moresource§fn from_list(items: &[NestedMeta]) -> Result<Self>
fn from_list(items: &[NestedMeta]) -> Result<Self>
Create an instance from a list of nested meta items.
source§fn from_meta(item: &Meta) -> Result<Self>
fn from_meta(item: &Meta) -> Result<Self>
Create an instance from a
syn::Meta
by dispatching to the format-appropriate
trait function. This generally should not be overridden by implementers. Read morefn from_nested_meta(item: &NestedMeta) -> Result<Self>
source§fn from_word() -> Result<Self>
fn from_word() -> Result<Self>
Create an instance from the presence of the word in the attribute with no
additional options specified.
source§fn from_value(value: &Lit) -> Result<Self>
fn from_value(value: &Lit) -> Result<Self>
Create an instance from a literal value of either
foo = "bar"
or foo("bar")
.
This dispatches to the appropriate method based on the type of literal encountered,
and generally should not be overridden by implementers. Read morefn from_expr(expr: &Expr) -> Result<Self>
source§fn from_char(value: char) -> Result<Self>
fn from_char(value: char) -> Result<Self>
Create an instance from a char literal in a value position.
source§fn from_string(value: &str) -> Result<Self>
fn from_string(value: &str) -> Result<Self>
Create an instance from a string literal in a value position.