1. 首页
  2. 编程语言
  3. 其他
  4. ProgrammingRust原版无水印pdf2017.11月出版新书

ProgrammingRust原版无水印pdf2017.11月出版新书

上传者: 2019-05-20 02:26:36上传 PDF文件 9.97MB 热度 82次
Programming Rust Fast, Safe Systems Development pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除by Jim Blandy and Jason OrendorffCopyright © 2018 Jim Blandy, Jason Orendorff. All rights reserved.Printed in the United States of America.Published by Programming RustFast, Safe Systems DevelopmentJim blandy and Jason OrendorffBeijing.Boston. Farnham Sebastopol. Tokyo OREILLYProgramming rustby jim blandy and jason OrendorffCopyright O 2018 Jim Blandy, Jason Orendorff. All rights reservedPrinted in the united states of americaPublished by O Reilly Media, InC, 1005 Gravenstein Highway North, Sebastopol, CA 95472OReilly books may be purchased for educational, business, or sales promotional use Online editions arealsoavailableformosttitles(http://safaribooksonline.com).Formoreinformationcontactourinstitutionalsalesdepartment800-998-9938orcorporate@oreilly.comEditors: Jeff BleielIndexer: Word Co Indexing Services, IncProduction Editor: Colleen ColeInterior Designer: David FutatoCopyeditor: Jasmine KwitynCover Designer: Karen MontgomeryProofreader: sharon wilkeyIllustrator Rebecca demarestDecember 2017. First editionRevision history for the first Edition2017-11-20 First ReleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781491927212forreleasedetailsThe O reilly logo is a registered trademark of O Reilly Media, Inc. Programming rust, the cover image,and related trade dress are trademarks of o reilly media, IncWhile the publisher and the authors have used good faith efforts to ensure that the information andinstructions contained in this work are accurate, the publisher and the authors disclaim all responsibilityfor errors or omissions, including without limitation responsibility for damages resulting from the use ofor reliance on this work. Use of the information and instructions contained in this work is at your ownrisk. If any code samples or other technology this work contains or describes is subject to open sourcelicenses or the intellectual property rights of others, it is your responsibility to ensure that your usethereof complies with such licenses and/or rights978-1-491-92728-1Table of contentsPreface1. Why rust?.2. A Tour of rust377Downloading and Installing rustA Simple Function10Writing and Running Unit Tests11Handling Command-Line Arguments12A Simple web server17Concurrency23What the Mandelbrot Set Actually Is24Parsing Pair Command-Line arguments28Mapping from Pixels to Complex numbers31Plotting the Set32Writing Image Files33A Concurrent Mandelbrot Program35Running the mandelbrot plotterSafety is invisible413. Basic Types..........................43Machine Type46Integer Types47Floating-Point Types50The bool Ty51Characters52Tuples54Pointer Types55Refe56B56Raw pointers57Arrays, Vectors, and Slicesarrays58Vectors59Building Vectors Element by Element6262String Types64String Literals64Byte strinsgs65Strings in MemoryString67Using strings68Other String-Like Types68Beyond the basics694. Ownership,.…….….….71Ownership73MovesMore Operations That Move82Moves and Control flow84Moves and Indexed Content84Copy Types: The Exception to Moves86Rc and Arc: Shared Ownershi5. References鲁鲁鲁93References as valuesRust References Versus C++ References97Assigning ReferencesReferences to references99QComparing references899References are Never null100Borrowing references to arbitrary expressions100References to Slices and Trait Objects101Reference safety101Borrowing a Local variable101Receiving references as parameters105Passing References as arguments107Returning References107Structs Containing References109iv Table of ContentsDistinct Lifetime parameters111Omitting Lifetime Parameters112Sharing versus mutation114Taking Arms Against a Sea of Objects1216. Expressions123An Expression Language123Blocks and semicolons124Declarations126if and match127if let129LOops130return上 Xpressions132Why rust has l133Function and method calls134Fields and Elements135Reference operators137Arithmetic, Bitwise, Comparison, and Logical Operators137assignment138Type Casts139Closures140Precedence and associativityOnward142rror Handling.Panic145Unwinding146aborting147Result148Catching Errors148Result Type aliases150Printing errors150Propagating errors152Working with multiple error types153Dealing with Errors That"Cant Happen155Ignoring Errors156Handling Errors in main O156Declaring a Custom Error Type157Why Results?1588.〔 rates and modules.,161Crates161Table of contentsBuild profiles164Module165Modules in Separate files166Paths and imports167The Standard Prelude169Items, the Building Blocks of rust170Turning a Program into a Library172The src/bin directory174Attributes175Tests and documentation178Integration Tests180Documentation181Doc- Tests182Specifying dependencies185Versions186Cargo. lock187Publishing Crates to crates. io188Workspaces190More nice things191StructsNamed-Field Structs193Tuple-Like Structs196Unit-Like s197Struct layout197Defining Methods with impl198Generic Structs202Structs with Lifetime parameters20Deriving Common Traits for Struct Types204Interior Mutability20510. Enums and patternsEnums212Enums with data214Enums in memory215Rich Data Structures using enums216Generic Enums218Patterns221Literals. Variables, and Wildcards in patterns223Tuple and Struct Patterns225Reference Patterns226Matching Multiple possibilities229Table of contentsPattern Guards229a patterns230Where Patterns Are allowed230Populating a Binary Tree232The Big Picture2331. Traits and generics. 444444.235Using Traits237Trait Objects238Trait Object layout239Generic Functions240Which to use243Defining and Implementing traits245Default methods246Traits and Other People's Types247Self in traits249Subtrait250Static methods251Fully Qualified Method Calls252Traits That Define Relationships Between Types253Associated Types (or How Iterators Work254Generic Traits(or How Operator Overloading Works257Buddy Traits (or How rand: random Works)258Reverse-Engineering Bounds260Conclusion26312. Operator Overloading.......265Arithmetic and Bitwise Operators266Unary Operators268Binary operators269Compound Assignment Operators270Equality Tests272Ordered Comparisons275Index and index Mut277Other operators28013. Utility Traits281Dr282285Clone287Co289Deref and Derefmut289Table of contents|ⅶiDefaultAsRef and Smut294Borrow and borrowmut296From and into297ToOwned300Borrow and toowned at Work: The Humble cow30014. Closures303Capturing variables305Closures that borrow306Closures That Steal306Function and Closure Types308Closure performance310Closures and Safet311Closures That Kill312Nonce312FnMut314Callbacks316Using Closures Effectively31915. terators321The Iterator and Intolterator Traits3Creating Iterators324iter and iter mut Methods324Intolterator Implementations325drain method327Other Iterator Sources328Iterator Adapters330map and filter330filter_ map and flat_map332scan335take and take while335skip and skip_while336peelable337338Reversible iterators and rev339inspect340chain341enumerate341zip34by ref342cloned344viii Table of Contents
用户评论
码姐姐匿名网友 2019-05-20 02:26:36

适合C++程序员看

码姐姐匿名网友 2019-05-20 02:26:36

正式发布版,不错。

码姐姐匿名网友 2019-05-20 02:26:36

资源不错,谢谢

码姐姐匿名网友 2019-05-20 02:26:36

不错. 非常清晰.

码姐姐匿名网友 2019-05-20 02:26:36

文字版的pdf,还带有目录。太赞啦!!!!

码姐姐匿名网友 2019-05-20 02:26:36

很清晰,质量很好

码姐姐匿名网友 2019-05-20 02:26:36

很完整,但是可惜不是中文的。

码姐姐匿名网友 2019-05-20 02:26:36

不错 完整 新

码姐姐匿名网友 2019-05-20 02:26:36

不错的书籍