pub struct DocFileName {
pub number: PRNumber,
pub title: Option<Title>,
}
Expand description
Helps to build and check filenames for prdoc
A prdoc
is made of its content: a DocFile but also requires a
valid filename.
Fields§
§number: PRNumber
The PR number
title: Option<Title>
The title of the PR as mentioned in the filename. Note: This is NOT the title property of a PRDoc file.
Implementations§
Source§impl DocFileName
impl DocFileName
Sourcepub fn new(number: PRNumber, title: Option<Title>) -> Self
pub fn new(number: PRNumber, title: Option<Title>) -> Self
Construct a new DocFileName
from a PR number and an optional title.
Trait Implementations§
Source§impl Debug for DocFileName
impl Debug for DocFileName
Source§impl Display for DocFileName
impl Display for DocFileName
Source§impl From<DocFileName> for PRDocSource
impl From<DocFileName> for PRDocSource
Source§fn from(file: DocFileName) -> Self
fn from(file: DocFileName) -> Self
Converts to this type from the input type.
Source§impl From<DocFileName> for PathBuf
impl From<DocFileName> for PathBuf
Source§fn from(val: DocFileName) -> Self
fn from(val: DocFileName) -> Self
Converts to this type from the input type.
Source§impl From<u16> for DocFileName
impl From<u16> for DocFileName
Source§impl Hash for DocFileName
impl Hash for DocFileName
Source§impl PartialEq for DocFileName
impl PartialEq for DocFileName
Source§impl Serialize for DocFileName
impl Serialize for DocFileName
Source§impl TryFrom<&PathBuf> for DocFileName
impl TryFrom<&PathBuf> for DocFileName
impl Eq for DocFileName
impl StructuralPartialEq for DocFileName
Auto Trait Implementations§
impl Freeze for DocFileName
impl RefUnwindSafe for DocFileName
impl Send for DocFileName
impl Sync for DocFileName
impl Unpin for DocFileName
impl UnwindSafe for DocFileName
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.