pub struct EnderecoType {
pub logradouro: String,
pub numero: String,
pub complemento: Option<String>,
pub bairro: String,
pub municipio: String,
pub uf: String,
pub cep: String,
pub pais: Option<String>,
}Expand description
Endereço
Fields§
§logradouro: String§numero: String§complemento: Option<String>§bairro: String§municipio: String§uf: String§cep: String§pais: Option<String>Implementations§
Source§impl EnderecoType
impl EnderecoType
pub async fn logradouro(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn numero(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn complemento(&self, ctx: &Context<'_>) -> Result<&Option<String>>
pub async fn bairro(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn municipio(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn uf(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn cep(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn pais(&self, ctx: &Context<'_>) -> Result<&Option<String>>
Trait Implementations§
Source§impl Clone for EnderecoType
impl Clone for EnderecoType
Source§fn clone(&self) -> EnderecoType
fn clone(&self) -> EnderecoType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContainerType for EnderecoType
impl ContainerType for EnderecoType
Source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json value
async_graphql::Value. Read moreSource§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Collect all the fields of the container that are queried in the
selection set. Read more
Source§fn find_entity(
&self,
_: &ContextBase<'_, &Positioned<Field>>,
_params: &ConstValue,
) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
fn find_entity( &self, _: &ContextBase<'_, &Positioned<Field>>, _params: &ConstValue, ) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
Find the GraphQL entity with the given name from the parameter. Read more
Source§impl Debug for EnderecoType
impl Debug for EnderecoType
Source§impl<'de> Deserialize<'de> for EnderecoType
impl<'de> Deserialize<'de> for EnderecoType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl OutputType for EnderecoType
impl OutputType for EnderecoType
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl Serialize for EnderecoType
impl Serialize for EnderecoType
impl ObjectType for EnderecoType
Auto Trait Implementations§
impl Freeze for EnderecoType
impl RefUnwindSafe for EnderecoType
impl Send for EnderecoType
impl Sync for EnderecoType
impl Unpin for EnderecoType
impl UnsafeUnpin for EnderecoType
impl UnwindSafe for EnderecoType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more