Module cargo_registry::krate [] [src]

Reexports

use std::ascii::AsciiExt;
use std::cmp;
use std::collections::HashMap;
use conduit::Request;
use conduit::Response;
use conduit_router::RequestParams;
use diesel::associations::Identifiable;
use diesel::helper_types::Select;
use diesel::pg::upsert::*;
use diesel::pg::Pg;
use diesel::prelude::*;
use diesel;
use diesel_full_text_search::*;
use license_exprs;
use hex::ToHex;
use serde_json;
use semver;
use time::Timespec;
use url::Url;
use chrono::NaiveDate;
use app::App;
use app::RequestApp;
use badge::EncodableBadge;
use category::EncodableCategory;
use category::CrateCategory;
use db::RequestTransaction;
use dependency;
use dependency::ReverseDependency;
use dependency::EncodableDependency;
use download::VersionDownload;
use download::EncodableVersionDownload;
use git;
use keyword::EncodableKeyword;
use keyword::CrateKeyword;
use owner::EncodableOwner;
use owner::Owner;
use owner::Rights;
use owner::OwnerKind;
use owner::Team;
use owner::rights;
use owner::CrateOwner;
use pagination::Paginate;
use render;
use schema::*;
use upload;
use user::RequestUser;
use util::read_le_u32;
use util::read_fill;
use util::RequestUtils;
use util::CargoResult;
use util::internal;
use util::ChainError;
use util::human;
use version::EncodableVersion;
use version::NewVersion;
use User;
use Keyword;
use Version;
use Category;
use Badge;
use Replica;
use diesel::types::Text;
use diesel::types::Date;

Structs

Crate
CrateDownload
CrateLinks
EncodableCrate
Follow
NewCrate
canon_crate_name_t
to_char_t

Constants

ALL_COLUMNS
DOCUMENTATION_BLACKLIST

Hosts in this blacklist are known to not be hosting documentation, and are possibly of malicious intent e.g. ad tracking networks, etc.

MAX_NAME_LENGTH
_IMPL_DESERIALIZE_FOR_CrateLinks
_IMPL_DESERIALIZE_FOR_EncodableCrate
_IMPL_QUERYABLE_FOR_CRATE
_IMPL_QUERYABLE_FOR_CRATEDOWNLOAD
_IMPL_QUERYABLE_FOR_FOLLOW
_IMPL_SERIALIZE_FOR_CrateLinks
_IMPL_SERIALIZE_FOR_EncodableCrate

Functions

add_owners

Handles the PUT /crates/:crate_id/owners route.

canon_crate_name
download

Handles the GET /crates/:crate_id/:version/download route. This returns a URL to the location where the crate is stored.

downloads

Handles the GET /crates/:crate_id/downloads route.

follow

Handles the PUT /crates/:crate_id/follow route.

follow_target
following

Handles the GET /crates/:crate_id/following route.

increment_download_counts
index

Handles the GET /crates route. Returns a list of crates. Called in a variety of scenarios in the front end, including: - Alphabetical listing of crates - List of crates under a specific owner - Listing a user's followed crates

modify_owners
new

Handles the PUT /crates/new route. Used by cargo publish to publish a new crate or to publish a new version of an existing crate.

owner_team

Handles the GET /crates/:crate_id/owner_team route.

owner_user

Handles the GET /crates/:crate_id/owner_user route.

owners

Handles the GET /crates/:crate_id/owners route.

parse_new_headers

Used by the krate::new function.

readme

Handles the GET /crates/:crate_id/:version/readme route.

remove_owners

Handles the DELETE /crates/:crate_id/owners route.

reverse_dependencies

Handles the GET /crates/:crate_id/reverse_dependencies route.

show

Handles the GET /crates/:crate_id route.

summary

Handles the GET /summary route.

to_char
unfollow

Handles the DELETE /crates/:crate_id/follow route.

versions

Handles the GET /crates/:crate_id/versions route.

Type Definitions

AllColumns

We literally never want to select textsearchable_index_col so we provide this type and constant to pass to .select

CrateQuery
canon_crate_name
to_char