开发者交流平台
开发者交流平台

通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。

bj
登录
  • 友情链接
站内
trait-objects

trait-objects

go

将返回 impl Trait 的存储函数作为 trait 对象

英文: Store function returning impl Trait as trait object 问题 根据下面的示例,我正在尝试将函数存储为特征对象。我已经弄清楚了如何对返回具体类型的...
huangapple 2023年7月10日132评论function rust
go

从关联类型的切片中获取特性对象的切片。

英文: Getting a slice of trait objects from a slice of an associated type 问题 我有两个相关的特性 `List` 和 `ListI...
huangapple 2023年6月26日139评论rust type-conversion
go

How to cast Vec<Box<dyn SomeTrait + Send + Sync>> to Vec<Box<dyn SomeTrait + Sync>> in rust?

英文: How to cast Vec<Box<dyn SomeTrait + Send + Sync>> to Vec<Box<dyn SomeTrait + S...
huangapple 2023年5月21日129评论casting rust
go

如何在使用高阶函数筛选一组项目时避免分配?

英文: How can I avoid allocation when filtering on a set of items with a higher order function? 问题 尝试根...
huangapple 2023年4月10日123评论generics rust
go

Trait object as associated type of a trait object.

英文: Trait object as associated type of a trait object 问题 I can provide the translated code part as r...
huangapple 2023年3月21日134评论rust trait-objects
go

克隆具体类型的自定义结构体为特征对象

英文: Clone custom structs of concrete type as trait objects 问题 使用Rc,我可以将具体类型的Rc转换为特征对象: use std::rc::...
huangapple 2023年3月7日160评论rust wrapper
go

无法放宽 Trait Object 的生命周期

英文: Cannot relax lifetime of Trait Object 问题 我有以下代码: use tokio; // 1.7.1 use futures::future::Future...
huangapple 2023年2月18日135评论rust rust-tokio
go

定义类型为 TimeZone 的变量。

英文: Define variable of type TimeZone 问题 以下是您要求的代码部分的翻译: // 原始代码 use chrono_tz::Tz; use chrono::{Time...
huangapple 2023年2月6日132评论rust trait-objects
name
开发者交流平台
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
文章117266 留言 4 访客17107620

热门标签

r spring go android java javascript html flutter spring-boot css reactjs arrays node.js sql json pandas c++ python typescript c#

悟已往之不谏,知来者之可追!

今日
00%
已00小时
本周
00%
已过00天
本月
00%
已过00天
今年
00%
已是00月

Copyright ©  开发者交流平台 版权所有.

闽 ICP 备 2022019110 号 - 1
  • 开发者交流平台

    本页二维码