pub struct Guideline {
pub line: Line,
pub name: Option<Name>,
pub color: Option<Color>,
/* private fields */
}
Expand description
A guideline associated with a glyph.
Fields§
§line: Line
The line itself.
name: Option<Name>
An arbitrary name for the guideline.
color: Option<Color>
The color of the line.
Implementations§
source§impl Guideline
impl Guideline
sourcepub fn new(
line: Line,
name: Option<Name>,
color: Option<Color>,
identifier: Option<Identifier>,
lib: Option<Plist>
) -> Self
pub fn new( line: Line, name: Option<Name>, color: Option<Color>, identifier: Option<Identifier>, lib: Option<Plist> ) -> Self
Returns a new Guideline
struct.
sourcepub fn lib_mut(&mut self) -> Option<&mut Plist>
pub fn lib_mut(&mut self) -> Option<&mut Plist>
Returns a mutable reference to the Guideline’s lib.
sourcepub fn replace_lib(&mut self, lib: Plist) -> Option<Plist>
pub fn replace_lib(&mut self, lib: Plist) -> Option<Plist>
Replaces the actual lib by the lib given in parameter, returning the old lib if present. Sets a new UUID v4 identifier if none is set already.
sourcepub fn take_lib(&mut self) -> Option<Plist>
pub fn take_lib(&mut self) -> Option<Plist>
Takes the lib out of the Guideline, leaving a None in its place.
sourcepub fn identifier(&self) -> Option<&Identifier>
pub fn identifier(&self) -> Option<&Identifier>
Returns a reference to the Guideline’s identifier.
sourcepub fn replace_identifier(&mut self, id: Identifier) -> Option<Identifier>
pub fn replace_identifier(&mut self, id: Identifier) -> Option<Identifier>
Replaces the actual identifier by the identifier given in parameter, returning the old identifier if present.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Guideline
impl<'de> Deserialize<'de> for Guideline
source§fn deserialize<D>(deserializer: D) -> Result<Guideline, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Guideline, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Guideline
impl PartialEq for Guideline
impl StructuralPartialEq for Guideline
Auto Trait Implementations§
impl Freeze for Guideline
impl RefUnwindSafe for Guideline
impl Send for Guideline
impl Sync for Guideline
impl Unpin for Guideline
impl UnwindSafe for Guideline
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