Tile

Struct Tile 

Source
pub struct Tile {
    pub x: u32,
    pub y: u32,
    pub z: u8,
}
Expand description

Tile X-Y-Z struct

Fields§

§x: u32

x value (column)

§y: u32

y value (row – flipped in mbtiles)

§z: u8

z value (zoom level)

Implementations§

Source§

impl Tile

Source

pub fn new(x: u32, y: u32, z: u8) -> Tile

Create a new Tile without checking validity

Source

pub fn try_new(x: u32, y: u32, z: u8) -> Result<Tile, UtilesCoreError>

Create a Tile with validity check

§Errors

Returns an error if the tile is invalid (e.g. x or y >= 2^z)

Source

pub fn new_checked(x: u32, y: u32, z: u8) -> Option<Tile>

Construct a tile with validity check - returns Option<Tile>

Source

pub fn new_unchecked(x: u32, y: u32, z: u8) -> Tile

Construct a tile without any checking.

Source

pub fn flip(&self) -> Tile

flip the y value (row) and return flipped tile

Source

pub fn bounds(&self) -> (f64, f64, f64, f64)

Return bounds tuple (west, south, east, north) for the tile

Source

pub fn from_row_major_id(id: u64) -> Tile

Return tile from row-major tile-id

Source

pub fn from_rmid(id: u64) -> Tile

Return tile from row-major tile-id (alias for from_row_major_id)

Source

pub fn fmt_zxy(&self, sep: Option<&str>) -> String

Return zxy string with optional separator (default is ‘/’)

Source

pub fn fmt_zxy_ext(&self, ext: &str, sep: Option<&str>) -> String

Return zxy string with extension and optional separator (default is ‘/’)

§Examples
use utiles_core::Tile;
let tile = Tile::new(1, 2, 3);
assert_eq!(tile.fmt_zxy_ext("png", Some("-")), "3-1-2.png");
assert_eq!(tile.fmt_zxy_ext("png", None), "3/1/2.png");
Source

pub fn from_quadkey(quadkey: &str) -> Result<Tile, UtilesCoreError>

Convert quadkey string to Tile

§Errors

Returns error on invalid quadkey (e.g. “1234” – oh no ‘4’ is invalid)

Source

pub fn from_qk(qk: &str) -> Result<Tile, UtilesCoreError>

Convert quadkey string to Tile (alias for from_quadkey)

§Errors

Returns error on invalid quadkey (e.g. “1234” – oh no ‘4’ is invalid)

Source

pub fn from_json_obj(json: &str) -> Result<Tile, UtilesCoreError>

Return tile from json-object string (e.g. {"x": 1, "y": 2, "z": 3})

§Errors

Returns error if serde parsing fails

§Examples
use utiles_core::Tile;
let tile = Tile::from_json_obj(r#"{"x": 1, "y": 2, "z": 3}"#).unwrap();
assert_eq!(tile, Tile::new(1, 2, 3));
Source

pub fn from_json_arr(json: &str) -> Result<Tile, UtilesCoreError>

Return tile from json-array string (e.g. [1, 2, 3])

§Errors

Returns error if serde parsing fails

§Examples
use utiles_core::Tile;
let tile = Tile::from_json_arr("[1, 2, 3]").unwrap();
assert_eq!(tile, Tile::new(1, 2, 3));
Source

pub fn from_json(json: &str) -> Result<Tile, UtilesCoreError>

Return tile from json string either object or array

§Errors

Returns error if serde parsing fails

§Examples
use utiles_core::Tile;
let tile_from_obj = Tile::from_json(r#"{"x": 1, "y": 2, "z": 3}"#).unwrap();
assert_eq!(tile_from_obj, Tile::new(1, 2, 3));
let tile_from_arr = Tile::from_json(r#"[1, 2, 3]"#).unwrap();
assert_eq!(tile_from_arr, Tile::new(1, 2, 3));
Source

pub fn from_json_loose(json: &str) -> Result<Tile, UtilesCoreError>

Return tile from json string either object or array

§Errors

Returns error if unable to parse json string

Source

pub fn quadkey(&self) -> String

Return the quadkey for the tile

Source

pub fn qk(&self) -> String

Return the quadkey for the tile (alias for quadkey)

Source

pub fn from_lnglat_zoom( lng: f64, lat: f64, zoom: u8, truncate: Option<bool>, ) -> Result<Tile, UtilesCoreError>

Return new Tile from given (lng, lat, zoom)

§Errors

Returns an error if the conversion fails resulting in invalid tile

Source

pub fn up(&self) -> Tile

Return the bounding box of the tile

Source

pub fn down(&self) -> Tile

Return the tile to the bottom

Source

pub fn left(&self) -> Tile

Return the tile to the left

Source

pub fn right(&self) -> Tile

Return the tile to the right

Source

pub fn up_left(&self) -> Tile

Return the tile to the top left

Source

pub fn up_right(&self) -> Tile

Return the tile to the top right

Source

pub fn down_left(&self) -> Tile

Return the tile to the bottom left

Source

pub fn down_right(&self) -> Tile

Return the tile to the bottom right

Source

pub fn children1(&self) -> [Tile; 4]

Return direct children

Source

pub fn children(&self, zoom: Option<u8>) -> Vec<Tile>

Return the children tiles of the tile

Source

pub fn children_zorder(&self, zoom: Option<u8>) -> Vec<Tile>

Return the children tiles of the tile

Source

pub fn parent(&self, zoom: Option<u8>) -> Option<Tile>

Return the parent tile

Source

pub fn siblings(&self) -> Vec<Tile>

Return sibling tiles that share the same parent tile (not neighbors)

Source

pub fn feature( &self, opts: &FeatureOptions, ) -> Result<TileFeature, UtilesCoreError>

Return a TileFeature for the tile

§Errors

Returns an error if the feature creation fails (which may be impossible [2024-08-14])

Source§

impl Tile

Source

pub fn pmtileid(&self) -> u64

Return pmtile-id for the tile

Source

pub fn from_pmtileid(id: u64) -> Tile

Return tile from pmtile-id

Source

pub fn from_pmid(id: u64) -> Tile

Return tile from pmtile-id (alias for from_pmtileid)

Source

pub fn parent_pmtileid(&self) -> Option<u64>

Return the parent tile’s pmtile-id

Trait Implementations§

Source§

impl Clone for Tile

Source§

fn clone(&self) -> Tile

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Tile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Tile

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Tile, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Tile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<(u32, u32, u8)> for Tile

Source§

fn from(xyz: (u32, u32, u8)) -> Tile

Converts to this type from the input type.
Source§

impl From<(u8, u32, u32)> for Tile

Source§

fn from(xyz: (u8, u32, u32)) -> Tile

Converts to this type from the input type.
Source§

impl From<MbtTileRow> for Tile

Source§

fn from(row: MbtTileRow) -> Self

Converts to this type from the input type.
Source§

impl From<Tile> for SiblingRelationship

Source§

fn from(value: Tile) -> SiblingRelationship

Converts to this type from the input type.
Source§

impl From<Tile> for WebBBox

Source§

fn from(tile: Tile) -> WebBBox

Converts to this type from the input type.
Source§

impl From<TileCrz> for Tile

Source§

fn from(tile: TileCrz) -> Tile

Converts to this type from the input type.
Source§

impl From<TileTuple> for Tile

Source§

fn from(xyz: TileTuple) -> Tile

Converts to this type from the input type.
Source§

impl FromStr for Tile

Source§

type Err = Box<dyn Error>

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Tile, <Tile as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Tile

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IsOk for Tile

Source§

fn ok(&self) -> Result<Tile, UtilesCoreError>

Returns Ok if the value is Ok or an error Read more
Source§

impl Ord for Tile

Source§

fn cmp(&self, other: &Tile) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Tile

Source§

fn eq(&self, other: &Tile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Tile

Source§

fn partial_cmp(&self, other: &Tile) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &Tile) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Tile

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TileChildren1 for Tile

Source§

fn children1(&self) -> [Tile; 4]

Returns direct children in Z order: 1) top-left 2) top-right 3) bottom-left 4) bottom-right
Source§

impl TileLike for &Tile

Source§

fn x(&self) -> u32

x coordinate (column)
Source§

fn y(&self) -> u32

y coordinate (row – flipped for TMS)
Source§

fn z(&self) -> u8

z coordinate (zoom level)
Source§

fn zoom(&self) -> u8

zoom level
Source§

fn yflip(&self) -> u32

x coordinate
Source§

fn flipy(&self) -> u32

both bc I keep forgetting which is which
Source§

fn yup(&self) -> u32

Source§

fn xyz_str_fslash(&self) -> String

Source§

fn zxy_str_fslash(&self) -> String

Source§

fn xyz_str_sep(&self, sep: &str) -> String

Source§

fn zxy_str_sep(&self, sep: &str) -> String

Source§

fn tile(&self) -> Tile

Return Tile struct
Source§

fn valid(&self) -> bool

Return if the tile is valid (x, y is in bounds for zoom level z)
Source§

fn ul(&self) -> LngLat

Return the ul (upper left) corner of the tile
Source§

fn ur(&self) -> LngLat

Return the ur (upper right) corner of the tile
Source§

fn lr(&self) -> LngLat

Return the lr (lower right) corner of the tile
Source§

fn ll(&self) -> LngLat

Return the ll (lower left) corner of the tile
Source§

fn quadkey(&self) -> String

Return the quadkey for the tile
Source§

fn qk(&self) -> String

Return the quadkey for the tile (alias for quadkey)
Source§

fn pmtileid(&self) -> u64

Return the pmtile-id for the tile
Source§

fn pmid(&self) -> u64

Return the pmtile id
Source§

fn row_major_id(&self) -> u64

Return the row major id for the tile
Source§

fn rmid(&self) -> u64

Return the row major id for the tile (alias for row_major_id)
Source§

fn bbox(&self) -> (f64, f64, f64, f64)

Return the geo-bbox tuple for the tile (west, south, east, north)
Source§

fn geobbox(&self) -> BBox

Source§

fn webbbox(&self) -> WebBBox

Source§

fn bbox_string(&self) -> String

Source§

fn center(&self) -> LngLat

Return the center of the tile as a LngLat
Source§

fn json_arr(&self) -> String

Return json array string for tile with spaces after commas
Source§

fn json_arr_min(&self) -> String

Return json array string for tile with no spaces after commas
Source§

fn json_obj(&self) -> String

Return json object string for tile
Source§

fn json(&self) -> String

Return json object string for tile
Source§

fn tuple_string(&self) -> String

Return tuple string for tile (x, y, z)
Source§

fn mbtiles_sql_where(&self) -> String

Return sql WHERE clause for querying mbtiles (y is up)
Source§

fn zbox(&self) -> TileZBox

return zbox for tile-like
Source§

fn children_zbox(&self, depth: Option<u8>) -> TileZBox

Return children-zbox for tile-like at optional depth (default 1)
Source§

fn neighbors(&self, wrapx: bool) -> Vec<Tile>

Return neighbor tiles for tile-like optionally wrapping x
Source§

impl TileLike for Tile

Source§

fn x(&self) -> u32

x coordinate (column)
Source§

fn y(&self) -> u32

y coordinate (row – flipped for TMS)
Source§

fn z(&self) -> u8

z coordinate (zoom level)
Source§

fn zoom(&self) -> u8

zoom level
Source§

fn yflip(&self) -> u32

x coordinate
Source§

fn flipy(&self) -> u32

both bc I keep forgetting which is which
Source§

fn yup(&self) -> u32

Source§

fn xyz_str_fslash(&self) -> String

Source§

fn zxy_str_fslash(&self) -> String

Source§

fn xyz_str_sep(&self, sep: &str) -> String

Source§

fn zxy_str_sep(&self, sep: &str) -> String

Source§

fn tile(&self) -> Tile

Return Tile struct
Source§

fn valid(&self) -> bool

Return if the tile is valid (x, y is in bounds for zoom level z)
Source§

fn ul(&self) -> LngLat

Return the ul (upper left) corner of the tile
Source§

fn ur(&self) -> LngLat

Return the ur (upper right) corner of the tile
Source§

fn lr(&self) -> LngLat

Return the lr (lower right) corner of the tile
Source§

fn ll(&self) -> LngLat

Return the ll (lower left) corner of the tile
Source§

fn quadkey(&self) -> String

Return the quadkey for the tile
Source§

fn qk(&self) -> String

Return the quadkey for the tile (alias for quadkey)
Source§

fn pmtileid(&self) -> u64

Return the pmtile-id for the tile
Source§

fn pmid(&self) -> u64

Return the pmtile id
Source§

fn row_major_id(&self) -> u64

Return the row major id for the tile
Source§

fn rmid(&self) -> u64

Return the row major id for the tile (alias for row_major_id)
Source§

fn bbox(&self) -> (f64, f64, f64, f64)

Return the geo-bbox tuple for the tile (west, south, east, north)
Source§

fn geobbox(&self) -> BBox

Source§

fn webbbox(&self) -> WebBBox

Source§

fn bbox_string(&self) -> String

Source§

fn center(&self) -> LngLat

Return the center of the tile as a LngLat
Source§

fn json_arr(&self) -> String

Return json array string for tile with spaces after commas
Source§

fn json_arr_min(&self) -> String

Return json array string for tile with no spaces after commas
Source§

fn json_obj(&self) -> String

Return json object string for tile
Source§

fn json(&self) -> String

Return json object string for tile
Source§

fn tuple_string(&self) -> String

Return tuple string for tile (x, y, z)
Source§

fn mbtiles_sql_where(&self) -> String

Return sql WHERE clause for querying mbtiles (y is up)
Source§

fn zbox(&self) -> TileZBox

return zbox for tile-like
Source§

fn children_zbox(&self, depth: Option<u8>) -> TileZBox

Return children-zbox for tile-like at optional depth (default 1)
Source§

fn neighbors(&self, wrapx: bool) -> Vec<Tile>

Return neighbor tiles for tile-like optionally wrapping x
Source§

impl TileParent for Tile

Source§

fn parent(&self, zoom: Option<u8>) -> Option<Tile>

Source§

fn root() -> Tile

Source§

fn iter_parents(&self) -> Parents<Self>

Source§

impl TryFrom<&Map<String, Value>> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from( map: &Map<String, Value>, ) -> Result<Tile, <Tile as TryFrom<&Map<String, Value>>>::Error>

Performs the conversion.
Source§

impl TryFrom<&Value> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from(val: &Value) -> Result<Tile, <Tile as TryFrom<&Value>>::Error>

Performs the conversion.
Source§

impl TryFrom<&Vec<Value>> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from( arr: &Vec<Value>, ) -> Result<Tile, <Tile as TryFrom<&Vec<Value>>>::Error>

Performs the conversion.
Source§

impl TryFrom<&str> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Tile, <Tile as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl TryFrom<(u32, u32, u32)> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from( xyz: (u32, u32, u32), ) -> Result<Tile, <Tile as TryFrom<(u32, u32, u32)>>::Error>

Performs the conversion.
Source§

impl TryFrom<(u64, u64, u64)> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from( tuple: (u64, u64, u64), ) -> Result<Tile, <Tile as TryFrom<(u64, u64, u64)>>::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Tile

Source§

type Error = UtilesCoreError

The type returned in the event of a conversion error.
Source§

fn try_from(val: Value) -> Result<Tile, <Tile as TryFrom<Value>>::Error>

Performs the conversion.
Source§

impl Copy for Tile

Source§

impl Eq for Tile

Source§

impl StructuralPartialEq for Tile

Auto Trait Implementations§

§

impl Freeze for Tile

§

impl RefUnwindSafe for Tile

§

impl Send for Tile

§

impl Sync for Tile

§

impl Unpin for Tile

§

impl UnwindSafe for Tile

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoResult<T> for T

Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn add_extension<T>(self, value: T) -> AddExtension<Self, T>
where Self: Sized,

Add some shareable value to request extensions. Read more
Source§

fn compression(self) -> Compression<Self>
where Self: Sized,

Compresses response bodies. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
Source§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension. Read more
Source§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension, using x-request-id as the header name. Read more
Source§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses. Read more
Source§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToString for T
where T: Display + ?Sized,

§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,