pub struct SignText {
pub messages: [TextComponent; 4],
pub color: DyeColor,
pub has_glowing_text: bool,
}Expand description
Text and styling for one side of a sign.
Fields§
§messages: [TextComponent; 4]The 4 lines of text (raw, unfiltered).
color: DyeColorText color (dye color applied to the sign).
has_glowing_text: boolWhether the text has a glowing effect (from glow ink sac).
Implementations§
Source§impl SignText
impl SignText
Sourcepub fn get_message(&self, index: usize) -> Option<&TextComponent>
pub fn get_message(&self, index: usize) -> Option<&TextComponent>
Gets a message line by index.
Sourcepub fn set_message(&mut self, index: usize, message: TextComponent)
pub fn set_message(&mut self, index: usize, message: TextComponent)
Sets a message line by index.
Sourcepub fn has_message(&self) -> bool
pub fn has_message(&self) -> bool
Checks if any line has text content.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SignText
impl RefUnwindSafe for SignText
impl Send for SignText
impl Sync for SignText
impl Unpin for SignText
impl UnsafeUnpin for SignText
impl UnwindSafe for SignText
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>