EnderDragonPart

Struct EnderDragonPart 

Source
pub struct EnderDragonPart<'mc>(/* private fields */);

Implementations§

Source§

impl<'mc> EnderDragonPart<'mc>

Source

pub fn parent(&self) -> Result<EnderDragon<'mc>, Box<dyn Error>>

Source

pub fn get_location( &self, loc: impl Into<Location<'mc>>, ) -> Result<Option<Location<'mc>>, Box<dyn Error>>

Stores the entity’s current position in the provided Location object.

If the provided Location is null this method does nothing and returns null.

Source

pub fn set_velocity( &self, velocity: impl Into<Vector<'mc>>, ) -> Result<(), Box<dyn Error>>

Sets this entity’s velocity in meters per tick

Source

pub fn velocity(&self) -> Result<Vector<'mc>, Box<dyn Error>>

Gets this entity’s current velocity

Source

pub fn height(&self) -> Result<f64, Box<dyn Error>>

Gets the entity’s height

Source

pub fn width(&self) -> Result<f64, Box<dyn Error>>

Gets the entity’s width

Source

pub fn bounding_box(&self) -> Result<BoundingBox<'mc>, Box<dyn Error>>

Gets the entity’s current bounding box.

The returned bounding box reflects the entity’s current location and size.

Source

pub fn is_on_ground(&self) -> Result<bool, Box<dyn Error>>

Returns true if the entity is supported by a block. This value is a state updated by the server and is not recalculated unless the entity moves.

Source

pub fn is_in_water(&self) -> Result<bool, Box<dyn Error>>

Returns true if the entity is in water.

Source

pub fn world(&self) -> Result<World<'mc>, Box<dyn Error>>

Gets the current world this entity resides in

Source

pub fn set_rotation(&self, yaw: f32, pitch: f32) -> Result<(), Box<dyn Error>>

Sets the entity’s rotation.

Note that if the entity is affected by AI, it may override this rotation.

Source

pub fn teleport( &self, location: impl Into<Location<'mc>>, cause: Option<impl Into<PlayerTeleportEventTeleportCause<'mc>>>, ) -> Result<bool, Box<dyn Error>>

Teleports this entity to the given location. If this entity is riding a vehicle, it will be dismounted prior to teleportation.

Source

pub fn get_nearby_entities( &self, x: f64, y: f64, z: f64, ) -> Result<Vec<Entity<'mc>>, Box<dyn Error>>

Returns a list of entities within a bounding box centered around this entity

Source

pub fn entity_id(&self) -> Result<i32, Box<dyn Error>>

Returns a unique id for this entity

Source

pub fn fire_ticks(&self) -> Result<i32, Box<dyn Error>>

Returns the entity’s current fire ticks (ticks before the entity stops being on fire).

Source

pub fn max_fire_ticks(&self) -> Result<i32, Box<dyn Error>>

Returns the entity’s maximum fire ticks.

Source

pub fn set_fire_ticks(&self, ticks: i32) -> Result<(), Box<dyn Error>>

Sets the entity’s current fire ticks (ticks before the entity stops being on fire).

Source

pub fn set_visual_fire(&self, fire: bool) -> Result<(), Box<dyn Error>>

Sets if the entity has visual fire (it will always appear to be on fire).

Source

pub fn is_visual_fire(&self) -> Result<bool, Box<dyn Error>>

Gets if the entity has visual fire (it will always appear to be on fire).

Source

pub fn freeze_ticks(&self) -> Result<i32, Box<dyn Error>>

Returns the entity’s current freeze ticks (amount of ticks the entity has been in powdered snow).

Source

pub fn max_freeze_ticks(&self) -> Result<i32, Box<dyn Error>>

Returns the entity’s maximum freeze ticks (amount of ticks before it will be fully frozen)

Source

pub fn set_freeze_ticks(&self, ticks: i32) -> Result<(), Box<dyn Error>>

Sets the entity’s current freeze ticks (amount of ticks the entity has been in powdered snow).

Source

pub fn is_frozen(&self) -> Result<bool, Box<dyn Error>>

Gets if the entity is fully frozen (it has been in powdered snow for max freeze ticks).

Source

pub fn remove(&self) -> Result<(), Box<dyn Error>>

Mark the entity’s removal.

Source

pub fn is_dead(&self) -> Result<bool, Box<dyn Error>>

Returns true if this entity has been marked for removal.

Source

pub fn is_valid(&self) -> Result<bool, Box<dyn Error>>

Returns false if the entity has died, been despawned for some other reason, or has not been added to the world.

Source

pub fn server(&self) -> Result<Server<'mc>, Box<dyn Error>>

Gets the {@link Server} that contains this Entity

Source

pub fn is_persistent(&self) -> Result<bool, Box<dyn Error>>

Returns true if the entity gets persisted.

By default all entities are persistent. An entity will also not get persisted, if it is riding an entity that is not persistent.

The persistent flag on players controls whether or not to save their playerdata file when they quit. If a player is directly or indirectly riding a non-persistent entity, the vehicle at the root and all its passengers won’t get persisted.

This should not be confused with {@link LivingEntity#setRemoveWhenFarAway(boolean)} which controls despawning of living entities.

Source

pub fn set_persistent(&self, persistent: bool) -> Result<(), Box<dyn Error>>

Sets whether or not the entity gets persisted.

Source

pub fn passenger(&self) -> Result<Option<Entity<'mc>>, Box<dyn Error>>

👎Deprecated

Gets the primary passenger of a vehicle. For vehicles that could have multiple passengers, this will only return the primary passenger.

Source

pub fn set_passenger( &self, passenger: impl Into<Entity<'mc>>, ) -> Result<bool, Box<dyn Error>>

👎Deprecated

Set the passenger of a vehicle.

Source

pub fn passengers(&self) -> Result<Vec<Entity<'mc>>, Box<dyn Error>>

Gets a list of passengers of this vehicle.

The returned list will not be directly linked to the entity’s current passengers, and no guarantees are made as to its mutability.

Source

pub fn add_passenger( &self, passenger: impl Into<Entity<'mc>>, ) -> Result<bool, Box<dyn Error>>

Add a passenger to the vehicle.

Source

pub fn remove_passenger( &self, passenger: impl Into<Entity<'mc>>, ) -> Result<bool, Box<dyn Error>>

Remove a passenger from the vehicle.

Source

pub fn is_empty(&self) -> Result<bool, Box<dyn Error>>

Check if a vehicle has passengers.

Source

pub fn eject(&self) -> Result<bool, Box<dyn Error>>

Eject any passenger.

Source

pub fn fall_distance(&self) -> Result<f32, Box<dyn Error>>

Returns the distance this entity has fallen

Source

pub fn set_fall_distance(&self, distance: f32) -> Result<(), Box<dyn Error>>

Sets the fall distance for this entity

Source

pub fn set_last_damage_cause( &self, event: impl Into<EntityDamageEvent<'mc>>, ) -> Result<(), Box<dyn Error>>

👎Deprecated

Record the last {@link EntityDamageEvent} inflicted on this entity

Source

pub fn last_damage_cause( &self, ) -> Result<Option<EntityDamageEvent<'mc>>, Box<dyn Error>>

Retrieve the last {@link EntityDamageEvent} inflicted on this entity. This event may have been cancelled.

Source

pub fn unique_id(&self) -> Result<JavaUUID<'mc>, Box<dyn Error>>

Returns a unique and persistent id for this entity

Source

pub fn ticks_lived(&self) -> Result<i32, Box<dyn Error>>

Gets the amount of ticks this entity has lived for.

This is the equivalent to “age” in entities.

Source

pub fn set_ticks_lived(&self, value: i32) -> Result<(), Box<dyn Error>>

Sets the amount of ticks this entity has lived for.

This is the equivalent to “age” in entities. May not be less than one tick.

Source

pub fn play_effect( &self, val_type: impl Into<EntityEffect<'mc>>, ) -> Result<(), Box<dyn Error>>

Performs the specified {@link EntityEffect} for this entity.

This will be viewable to all players near the entity.

If the effect is not applicable to this class of entity, it will not play.

Source

pub fn get_type(&self) -> Result<EntityType<'mc>, Box<dyn Error>>

Get the type of the entity.

Source

pub fn swim_sound(&self) -> Result<Sound<'mc>, Box<dyn Error>>

Get the {@link Sound} this entity makes while swimming.

Source

pub fn swim_splash_sound(&self) -> Result<Sound<'mc>, Box<dyn Error>>

Get the {@link Sound} this entity makes when splashing in water. For most entities, this is just {@link Sound#ENTITY_GENERIC_SPLASH}.

Source

pub fn swim_high_speed_splash_sound(&self) -> Result<Sound<'mc>, Box<dyn Error>>

Get the {@link Sound} this entity makes when splashing in water at high speeds. For most entities, this is just {@link Sound#ENTITY_GENERIC_SPLASH}.

Source

pub fn is_inside_vehicle(&self) -> Result<bool, Box<dyn Error>>

Returns whether this entity is inside a vehicle.

Source

pub fn leave_vehicle(&self) -> Result<bool, Box<dyn Error>>

Leave the current vehicle. If the entity is currently in a vehicle (and is removed from it), true will be returned, otherwise false will be returned.

Source

pub fn vehicle(&self) -> Result<Option<Entity<'mc>>, Box<dyn Error>>

Get the vehicle that this entity is inside. If there is no vehicle, null will be returned.

Source

pub fn set_custom_name_visible(&self, flag: bool) -> Result<(), Box<dyn Error>>

Sets whether or not to display the mob’s custom name client side. The name will be displayed above the mob similarly to a player.

This value has no effect on players, they will always display their name.

Source

pub fn is_custom_name_visible(&self) -> Result<bool, Box<dyn Error>>

Gets whether or not the mob’s custom name is displayed client side.

This value has no effect on players, they will always display their name.

Source

pub fn set_visible_by_default( &self, visible: bool, ) -> Result<(), Box<dyn Error>>

Sets whether or not this entity is visible by default. If this entity is not visible by default, then {@link Player#showEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)} will need to be called before the entity is visible to a given player.

Source

pub fn is_visible_by_default(&self) -> Result<bool, Box<dyn Error>>

Gets whether or not this entity is visible by default. If this entity is not visible by default, then {@link Player#showEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)} will need to be called before the entity is visible to a given player.

Source

pub fn tracked_by(&self) -> Result<JavaSet<'mc>, Box<dyn Error>>

Get all players that are currently tracking this entity.

‘Tracking’ means that this entity has been sent to the player and that they are receiving updates on its state. Note that the client’s {@code ‘Entity Distance’} setting does not affect the range at which entities are tracked.

Source

pub fn set_glowing(&self, flag: bool) -> Result<(), Box<dyn Error>>

Sets whether the entity has a team colored (default: white) glow. nb: this refers to the ‘Glowing’ entity property, not whether a glowing potion effect is applied

Source

pub fn is_glowing(&self) -> Result<bool, Box<dyn Error>>

Gets whether the entity is glowing or not. nb: this refers to the ‘Glowing’ entity property, not whether a glowing potion effect is applied

Source

pub fn set_invulnerable(&self, flag: bool) -> Result<(), Box<dyn Error>>

Sets whether the entity is invulnerable or not.

When an entity is invulnerable it can only be damaged by players in creative mode.

Source

pub fn is_invulnerable(&self) -> Result<bool, Box<dyn Error>>

Gets whether the entity is invulnerable or not.

Source

pub fn is_silent(&self) -> Result<bool, Box<dyn Error>>

Gets whether the entity is silent or not.

Source

pub fn set_silent(&self, flag: bool) -> Result<(), Box<dyn Error>>

Sets whether the entity is silent or not.

When an entity is silent it will not produce any sound.

Source

pub fn has_gravity(&self) -> Result<bool, Box<dyn Error>>

Returns whether gravity applies to this entity.

Source

pub fn set_gravity(&self, gravity: bool) -> Result<(), Box<dyn Error>>

Sets whether gravity applies to this entity.

Source

pub fn portal_cooldown(&self) -> Result<i32, Box<dyn Error>>

Gets the period of time (in ticks) before this entity can use a portal.

Source

pub fn set_portal_cooldown(&self, cooldown: i32) -> Result<(), Box<dyn Error>>

Sets the period of time (in ticks) before this entity can use a portal.

Source

pub fn scoreboard_tags(&self) -> Result<JavaSet<'mc>, Box<dyn Error>>

Returns a set of tags for this entity.

Entities can have no more than 1024 tags.

Source

pub fn add_scoreboard_tag( &self, tag: impl Into<String>, ) -> Result<bool, Box<dyn Error>>

Add a tag to this entity.

Entities can have no more than 1024 tags.

Source

pub fn remove_scoreboard_tag( &self, tag: impl Into<String>, ) -> Result<bool, Box<dyn Error>>

Removes a given tag from this entity.

Source

pub fn piston_move_reaction( &self, ) -> Result<PistonMoveReaction<'mc>, Box<dyn Error>>

Returns the reaction of the entity when moved by a piston.

Source

pub fn facing(&self) -> Result<BlockFace<'mc>, Box<dyn Error>>

Get the closest cardinal {@link BlockFace} direction an entity is currently facing.

This will not return any non-cardinal directions such as {@link BlockFace#UP} or {@link BlockFace#DOWN}.

{@link Hanging} entities will override this call and thus their behavior may be different.

Source

pub fn pose(&self) -> Result<Pose<'mc>, Box<dyn Error>>

Gets the entity’s current pose. Note that the pose is only updated at the end of a tick, so may be inconsistent with other methods. eg {@link Player#isSneaking()} being true does not imply the current pose will be {@link Pose#SNEAKING}

Source

pub fn spawn_category(&self) -> Result<SpawnCategory<'mc>, Box<dyn Error>>

Get the category of spawn to which this entity belongs.

Source

pub fn is_in_world(&self) -> Result<bool, Box<dyn Error>>

Checks if this entity has been spawned in a world.

Entities not spawned in a world will not tick, be sent to players, or be saved to the server files.

Source

pub fn as_string(&self) -> Result<Option<String>, Box<dyn Error>>

Get this entity as an NBT string.

This string should not be relied upon as a serializable value.

Source

pub fn create_snapshot( &self, ) -> Result<Option<EntitySnapshot<'mc>>, Box<dyn Error>>

Crates an {@link EntitySnapshot} representing the current state of this entity.

Source

pub fn copy( &self, to: Option<impl Into<Location<'mc>>>, ) -> Result<Entity<'mc>, Box<dyn Error>>

Creates a copy of this entity and all its data. Spawns the copy at the given location.

Note: Players cannot be copied.

Source

pub fn damage( &self, amount: f64, damage_source: Option<impl Into<DamageSource<'mc>>>, ) -> Result<(), Box<dyn Error>>

Deals the given amount of damage to this entity from a specified {@link DamageSource}.

Source

pub fn health(&self) -> Result<f64, Box<dyn Error>>

Gets the entity’s health from 0 to {@link #getMaxHealth()}, where 0 is dead.

Source

pub fn set_health(&self, health: f64) -> Result<(), Box<dyn Error>>

Sets the entity’s health from 0 to {@link #getMaxHealth()}, where 0 is dead.

Source

pub fn absorption_amount(&self) -> Result<f64, Box<dyn Error>>

Gets the entity’s absorption amount.

Source

pub fn set_absorption_amount(&self, amount: f64) -> Result<(), Box<dyn Error>>

Sets the entity’s absorption amount.

Note: The amount is capped to the value of {@link Attribute#GENERIC_MAX_ABSORPTION}. The effect of this method on that attribute is currently unspecified and subject to change.

Source

pub fn max_health(&self) -> Result<f64, Box<dyn Error>>

👎Deprecated

Gets the maximum health this entity has.

Source

pub fn set_max_health(&self, health: f64) -> Result<(), Box<dyn Error>>

👎Deprecated

Sets the maximum health this entity can have.If the health of the entity is above the value provided it will be set to that value.Note: An entity with a health bar ({@link Player}, {@link EnderDragon}, {@link Wither}, etc…} will have their bar scaled accordingly.

Source

pub fn reset_max_health(&self) -> Result<(), Box<dyn Error>>

👎Deprecated

Resets the max health to the original amount.

Source

pub fn set_metadata( &self, metadata_key: impl Into<String>, new_metadata_value: impl Into<MetadataValue<'mc>>, ) -> Result<(), Box<dyn Error>>

Sets a metadata value in the implementing object’s metadata store.

Source

pub fn get_metadata( &self, metadata_key: impl Into<String>, ) -> Result<Vec<MetadataValue<'mc>>, Box<dyn Error>>

Returns a list of previously set metadata values from the implementing object’s metadata store.

Source

pub fn has_metadata( &self, metadata_key: impl Into<String>, ) -> Result<bool, Box<dyn Error>>

Tests to see whether the implementing object contains the given metadata value in its metadata store.

Source

pub fn remove_metadata( &self, metadata_key: impl Into<String>, owning_plugin: impl Into<Plugin<'mc>>, ) -> Result<(), Box<dyn Error>>

Removes the given metadata value from the implementing object’s metadata store.

Source

pub fn send_message( &self, sender: impl Into<JavaUUID<'mc>>, messages: Option<impl Into<String>>, ) -> Result<(), Box<dyn Error>>

Sends this sender multiple messages

Source

pub fn name(&self) -> Result<String, Box<dyn Error>>

Gets the name of this command sender

Source

pub fn custom_name(&self) -> Result<Option<String>, Box<dyn Error>>

Gets the custom name on a mob or block. If there is no name this method will return null.

This value has no effect on players, they will always use their real name.

Source

pub fn set_custom_name( &self, name: impl Into<String>, ) -> Result<(), Box<dyn Error>>

Sets a custom name on a mob or block. This name will be used in death messages and can be sent to the client as a nameplate over the mob.

Setting the name to null or an empty string will clear it.

This value has no effect on players, they will always use their real name.

Source

pub fn persistent_data_container( &self, ) -> Result<PersistentDataContainer<'mc>, Box<dyn Error>>

Returns a custom tag container capable of storing tags on the object. Note that the tags stored on this container are all stored under their own custom namespace therefore modifying default tags using this {@link PersistentDataHolder} is impossible.

Source

pub fn instance_of(&self, other: impl Into<String>) -> Result<bool, Error>

Trait Implementations§

Source§

impl<'mc> Into<ComplexEntityPart<'mc>> for EnderDragonPart<'mc>

Source§

fn into(self) -> ComplexEntityPart<'mc>

Converts this type into the (usually inferred) input type.
Source§

impl<'mc> Into<Damageable<'mc>> for EnderDragonPart<'mc>

Source§

fn into(self) -> Damageable<'mc>

Converts this type into the (usually inferred) input type.
Source§

impl<'mc> JNIInstantiatable<'mc> for EnderDragonPart<'mc>

Source§

fn from_raw( env: &SharedJNIEnv<'mc>, obj: JObject<'mc>, ) -> Result<Self, Box<dyn Error>>

Source§

impl<'mc> JNIRaw<'mc> for EnderDragonPart<'mc>

Source§

fn jni_ref(&self) -> SharedJNIEnv<'mc>

Source§

fn jni_object(&self) -> JObject<'mc>

Auto Trait Implementations§

§

impl<'mc> !Freeze for EnderDragonPart<'mc>

§

impl<'mc> !RefUnwindSafe for EnderDragonPart<'mc>

§

impl<'mc> !Send for EnderDragonPart<'mc>

§

impl<'mc> !Sync for EnderDragonPart<'mc>

§

impl<'mc> Unpin for EnderDragonPart<'mc>

§

impl<'mc> UnwindSafe for EnderDragonPart<'mc>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

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

Source§

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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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